Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/app/api-interactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ export class ApiInteractions {
* @param seriesVolumeMarvelID the series ID in the Marvel API
*/
public setAPIComicData = (comic: Comic, seriesVolumeMarvelID: string) => {
if (comic.marvelUnlimitedId) {
comic.link = 'https://www.marvel.com/comics/issue/' + comic.marvelUnlimitedId + '/read';
return;
}

const params = new HttpParams()
.set('issueNumber', comic.issue)
.set('series', seriesVolumeMarvelID)
Expand Down
21 changes: 12 additions & 9 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,18 +387,21 @@ export class AppComponent implements OnInit {
preserveFragment: true });
this.router.navigateByUrl(urlTree);

// Get the series volume containing this comic
const expandedSeriesVolume = find(this.seriesVolumes, ['id', currentComic.seriesVolumeId]);
if (!expandedSeriesVolume) {
return console.error('The expanded series volume could not be found', currentComic.seriesVolumeId);
}
let expandedSeriesVolume;
// Get the series volume containing this comic, if we don't already have the Marvel Unlimited comic ID
if (!currentComic.marvelUnlimitedId) {
expandedSeriesVolume = find(this.seriesVolumes, ['id', currentComic.seriesVolumeId]);
if (!expandedSeriesVolume) {
return console.error('The expanded series volume could not be found', currentComic.seriesVolumeId);
}

if (!expandedSeriesVolume.marvelId) {
// We await this because setAPIComicData depends on having a marvel ID set
expandedSeriesVolume.marvelId = await this.getMarvelSeriesVolumeId(expandedSeriesVolume);
if (!expandedSeriesVolume.marvelId) {
// We await this because setAPIComicData depends on having a marvel ID set
expandedSeriesVolume.marvelId = await this.getMarvelSeriesVolumeId(expandedSeriesVolume);
}
}

this.apiInteractions.setAPIComicData(currentComic, expandedSeriesVolume.marvelId);
this.apiInteractions.setAPIComicData(currentComic, expandedSeriesVolume?.marvelId);
}

/*
Expand Down
1 change: 1 addition & 0 deletions src/app/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export interface Comic {
image?: string;
issue?: string;
link?: string;
marvelUnlimitedId?: number;
monthPublished?: number;
yearPublished?: number;
series?: string;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Omnibus.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_11.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_12.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_13.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_14.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_15.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_16.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_17.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_18.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_19.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_20.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_21.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_22.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_23.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_24.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_25.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_8.jpg
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_85.jpg
Binary file added src/assets/covers/Uncanny_Avengers_Vol_1_9.jpg
43 changes: 41 additions & 2 deletions src/database/collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7385,17 +7385,56 @@ const collections: Collection[] = [
'XMenLegacyVol22',
'XMenLegacyVol23',
'XMenLegacyVol24',
'XMenLegacyVol25',
'XMenLegacyVol26',
]
),
new CollectionPrototype(
'Uncanny Avengers Omnibus',
'2015-3-3',
[
'UncannyAvengersVol11',
'UncannyAvengersVol12',
'UncannyAvengersVol13',
'UncannyAvengersVol14',
]
),
/**
* Gap here, and in general the contents after here need to be reviewed.
*/
new CollectionPrototype(
'Uncanny Avengers Omnibus',
'2015-3-3',
[
'UncannyAvengersVol15',
'UncannyAvengersVol16',
'UncannyAvengersVol17',
'UncannyAvengersVol18',
'UncannyAvengersVol18.5',
'UncannyAvengersVol19',
'UncannyAvengersVol110',
'UncannyAvengersVol111',
'UncannyAvengersVol112',
'UncannyAvengersVol113',
'UncannyAvengersVol114',
'UncannyAvengersVol115',
'UncannyAvengersVol116',
'UncannyAvengersVol117',
'UncannyAvengersVol118',
'UncannyAvengersVol119',
'UncannyAvengersVol120',
'UncannyAvengersVol121',
'UncannyAvengersVol122',
'UncannyAvengersVol123',
'UncannyAvengersVol124',
'UncannyAvengersVol125',
'UncannyAvengersAnnualVol11',
]
),
new CollectionPrototype(
'X-Men Legacy: Legion Omnibus',
'2017-05-16',
[
'XMenLegacyVol25',
'XMenLegacyVol26',
'XMenLegacyVol27',
'XMenLegacyVol28',
'XMenLegacyVol29',
Expand Down
85 changes: 59 additions & 26 deletions src/database/comics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
/**
* The prototype for individual comics.
*/
function ComicPrototype(issue: string, datePublished: string, seriesVolumeId: string, titles: string) {
function ComicPrototype(issue: string, datePublished: string, seriesVolumeId: string, titles: string, marvelUnlimitedId: number) {
if (titles && !Array.isArray(titles)) {
throw new Error('Expected comic title to be an array, got' + titles);
}
Expand Down Expand Up @@ -33,6 +33,7 @@ function ComicPrototype(issue: string, datePublished: string, seriesVolumeId: st
this.id = seriesVolumeId + issue;
this.idSanitized = (seriesVolumeId + issue).replace(/[^a-zA-Z0-9-\s]/g, '');
this.issue = issue;
this.marvelUnlimitedId = marvelUnlimitedId;
this.yearPublished = this.date.getFullYear();
this.monthPublished = this.date.getMonth() + 1;
this.seriesVolumeId = seriesVolumeId;
Expand All @@ -52,7 +53,8 @@ function addComicsInSeriesVolume(seriesVolumeId: string, comicsInSeriesVolume) {
comic[0],
comic[1],
seriesVolumeId,
comic[2]
comic[2],
comic[3],
)
);
});
Expand Down Expand Up @@ -1426,6 +1428,37 @@ addComicsInSeriesVolume('ThunderboltsVol2', [
[130, '2009-3-25'],
[131, '2009-4-29'],
]);
addComicsInSeriesVolume('UncannyAvengersAnnualVol1', [
[1, '2014-4-30', , 46968],
]);
addComicsInSeriesVolume('UncannyAvengersVol1', [
[1, '2012-10-10', , 43339],
[2, '2012-11-28', , 43338],
[3, '2012-12-15', , 43337],
[4, '2013-2-27', , 43336],
[5, '2013-3-27', , 43335],
[6, '2013-4-10', , 43334],
[7, '2013-4-24', , 43333],
[8, '2013-5-8', , 43332],
[8.5, '2013-5-22', , 47343],
[9, '2013-6-19', , 43331],
[10, '2013-7-24', , 43330],
[11, '2013-8-28', , 43329],
[12, '2013-9-25', , 43328],
[13, '2013-10-23', , 49216],
[14, '2013-11-27', , 49217],
[15, '2013-12-18', , 49218],
[16, '2014-1-29', , 49219],
[17, '2014-2-26', , 49220],
[18, '2014-3-26', , 49221],
[19, '2014-4-23', , 49222],
[20, '2014-5-28', , 49223],
[21, '2014-6-25', , 49224],
[22, '2014-7-30', , 49225],
[23, '2014-8-27', , 49226],
[24, '2014-9-17', , 49227],
[25, '2014-10-1', , 49228],
]);
addComicsInSeriesVolume('UncannyXForceVol1', [
[1, '2010-10-6'],
[2, '2010-11-24'],
Expand Down Expand Up @@ -3221,30 +3254,30 @@ addComicsInSeriesVolume('XMenLegacyVol1', [
[275, '2012-10-31'],
]);
addComicsInSeriesVolume('XMenLegacyVol2', [
[1, '2012-11-14'],
[2, '2012-11-28'],
[3, '2012-12-19'],
[4, '2013-1-9'],
[5, '2013-1-30'],
[6, '2013-2-27'],
[7, '2013-3-13'],
[8, '2013-3-27'],
[9, '2013-4-17'],
[10, '2013-5-1'],
[11, '2013-5-22'],
[12, '2013-6-19'],
[13, '2013-7-3'],
[14, '2013-7-31'],
[15, '2013-8-21'],
[16, '2013-9-4'],
[17, '2013-9-18'],
[18, '2013-10-16'],
[19, '2013-11-6'],
[20, '2013-11-20'],
[21, '2013-12-4'],
[22, '2014-1-15'],
[23, '2014-1-29'],
[24, '2014-2-12'],
[1, '2012-11-14', , 44451],
[2, '2012-11-28', , 44455],
[3, '2012-12-19', , 45686],
[4, '2013-1-9', , 46799],
[5, '2013-1-30', , 46801],
[6, '2013-2-27', , 46803],
[7, '2013-3-13', , 46804],
[8, '2013-3-27', , 46805],
[9, '2013-4-17', , 46806],
[10, '2013-5-1', , 46807],
[11, '2013-5-22', , 46808],
[12, '2013-6-19', , 46809],
[13, '2013-7-3', , 46810],
[14, '2013-7-31', , 46811],
[15, '2013-8-21', , 46812],
[16, '2013-9-4', , 468013],
[17, '2013-9-18', , 468014],
[18, '2013-10-16', , 48925],
[19, '2013-11-6', , 48926],
[20, '2013-11-20', , 48927],
[21, '2013-12-4', , 49280],
[22, '2014-1-15', , 49281],
[23, '2014-1-29', , 49282],
[24, '2014-2-12', , 49283],
]);
addComicsInSeriesVolume('XMenMagnetoTestamentVol1', [
[1, '2008-9-10'],
Expand Down
2 changes: 2 additions & 0 deletions src/database/series.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ series.push(
new Series('Tales From The Age of Apocalypse: Sinster Bloodlines', {1: { startYear: 1997 }}),
new Series('Tales from the Age of Apocalyspse: By the Light', {1: { startYear: 1996 }}),
new Series('Thor', {1: { startYear: 1966 }}),
new Series('Uncanny Avengers', {1: { startYear: 2012 }}),
new Series('Uncanny Avengers Annual', {1: { startYear: 2014 }}),
new Series('Uncanny X-Force', {1: { startYear: 2010 }}),
new Series('Uncanny X-Men', {1: { startYear: 1963 }, 2: { startYear: 2011 }, 3: { startYear: 2013 }}),
new Series('Uncanny X-Men/Fantastic Four Annual', {1: { startYear: 1998 }}),
Expand Down
Loading