Fixed Previous Build (#2661)

This commit is contained in:
Joe Milazzo 2024-01-28 12:51:56 -06:00 committed by GitHub
parent e41795f9c2
commit 48aa8cacfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 19 additions and 15 deletions

View File

@ -7,7 +7,7 @@ import { AgeRating } from './metadata/age-rating';
export interface Chapter { export interface Chapter {
id: number; id: number;
range: string; range: string;
minNumber: string; number: string;
files: Array<MangaFile>; files: Array<MangaFile>;
/** /**
* This is used in the UI, it is not updated or sent to Backend * This is used in the UI, it is not updated or sent to Backend

View File

@ -282,7 +282,7 @@ export class EditSeriesModalComponent implements OnInit {
}); });
this.seriesVolumes.forEach(vol => { this.seriesVolumes.forEach(vol => {
vol.volumeFiles = vol.chapters?.sort(this.utilityService.sortChapters).map((c: Chapter) => c.files.map((f: any) => { vol.volumeFiles = vol.chapters?.sort(this.utilityService.sortChapters).map((c: Chapter) => c.files.map((f: any) => {
f.chapter = c.minNumber; f.chapter = c.number;
return f; return f;
})).flat(); })).flat();
}); });

View File

@ -123,7 +123,7 @@
<span> <span>
<app-card-actionables (actionHandler)="performAction($event, chapter)" [actions]="chapterActions" <app-card-actionables (actionHandler)="performAction($event, chapter)" [actions]="chapterActions"
[labelBy]="utilityService.formatChapterName(libraryType, true, true) + formatChapterNumber(chapter)"></app-card-actionables> [labelBy]="utilityService.formatChapterName(libraryType, true, true) + formatChapterNumber(chapter)"></app-card-actionables>
<ng-container *ngIf="chapter.minNumber !== '0'; else specialHeader"> <ng-container *ngIf="chapter.number !== '0'; else specialHeader">
{{utilityService.formatChapterName(libraryType, true, false) }} {{formatChapterNumber(chapter)}} {{utilityService.formatChapterName(libraryType, true, false) }} {{formatChapterNumber(chapter)}}
</ng-container> </ng-container>
</span> </span>

View File

@ -182,10 +182,10 @@ export class CardDetailDrawerComponent implements OnInit {
} }
formatChapterNumber(chapter: Chapter) { formatChapterNumber(chapter: Chapter) {
if (chapter.minNumber === '0') { if (chapter.number === '0') {
return '1'; return '1';
} }
return chapter.minNumber; return chapter.number;
} }
performAction(action: ActionItem<any>, chapter: Chapter) { performAction(action: ActionItem<any>, chapter: Chapter) {

View File

@ -7,9 +7,9 @@
<ng-template #fullComicTitle> <ng-template #fullComicTitle>
{{seriesName.length > 0 ? seriesName + ' - ' : ''}} {{seriesName.length > 0 ? seriesName + ' - ' : ''}}
<ng-container *ngIf="includeVolume && volumeTitle !== ''"> <ng-container *ngIf="includeVolume && volumeTitle !== ''">
{{entity.minNumber !== 0 ? (isChapter && includeVolume ? volumeTitle : '') : ''}} {{Number !== 0 ? (isChapter && includeVolume ? volumeTitle : '') : ''}}
</ng-container> </ng-container>
{{entity.minNumber !== 0 ? (isChapter ? t('issue-num') + entity.minNumber : volumeTitle) : t('special')}} {{Number !== 0 ? (isChapter ? t('issue-num') + Number : volumeTitle) : t('special')}}
</ng-template> </ng-template>
</ng-container> </ng-container>
<ng-container *ngSwitchCase="LibraryType.Manga"> <ng-container *ngSwitchCase="LibraryType.Manga">
@ -19,9 +19,9 @@
<ng-template #fullMangaTitle> <ng-template #fullMangaTitle>
{{seriesName.length > 0 ? seriesName + ' - ' : ''}} {{seriesName.length > 0 ? seriesName + ' - ' : ''}}
<ng-container *ngIf="includeVolume && volumeTitle !== ''"> <ng-container *ngIf="includeVolume && volumeTitle !== ''">
{{entity.minNumber !== 0 ? (isChapter && includeVolume ? volumeTitle : '') : ''}} {{Number !== 0 ? (isChapter && includeVolume ? volumeTitle : '') : ''}}
</ng-container> </ng-container>
{{entity.minNumber !== 0 ? (isChapter ? (t('chapter') + ' ') + entity.minNumber : volumeTitle) : t('special')}} {{Number !== 0 ? (isChapter ? (t('chapter') + ' ') + Number : volumeTitle) : t('special')}}
</ng-template> </ng-template>
</ng-container> </ng-container>
<ng-container *ngSwitchCase="LibraryType.Book"> <ng-container *ngSwitchCase="LibraryType.Book">

View File

@ -39,6 +39,10 @@ export class EntityTitleComponent implements OnInit {
titleName: string = ''; titleName: string = '';
volumeTitle: string = ''; volumeTitle: string = '';
get Number() {
if (this.utilityService.isVolume(this.entity)) return (this.entity as Volume).minNumber;
return (this.entity as Chapter).number;
}
get LibraryType() { get LibraryType() {
return LibraryType; return LibraryType;

View File

@ -226,7 +226,7 @@ export class SeriesDetailComponent implements OnInit, AfterContentChecked {
/** /**
* Track by function for Chapter to tell when to refresh card data * Track by function for Chapter to tell when to refresh card data
*/ */
trackByChapterIdentity = (index: number, item: Chapter) => `${item.title}_${item.minNumber}_${item.volumeId}_${item.pagesRead}`; trackByChapterIdentity = (index: number, item: Chapter) => `${item.title}_${item.number}_${item.volumeId}_${item.pagesRead}`;
trackByRelatedSeriesIdentify = (index: number, item: RelatedSeriesPair) => `${item.series.name}_${item.series.libraryId}_${item.series.pagesRead}_${item.relation}`; trackByRelatedSeriesIdentify = (index: number, item: RelatedSeriesPair) => `${item.series.name}_${item.series.libraryId}_${item.series.pagesRead}_${item.relation}`;
trackBySeriesIdentify = (index: number, item: Series) => `${item.name}_${item.libraryId}_${item.pagesRead}`; trackBySeriesIdentify = (index: number, item: Series) => `${item.name}_${item.libraryId}_${item.pagesRead}`;
trackByStoryLineIdentity = (index: number, item: StoryLineItem) => { trackByStoryLineIdentity = (index: number, item: StoryLineItem) => {
@ -341,13 +341,13 @@ export class SeriesDetailComponent implements OnInit, AfterContentChecked {
// This is a lone chapter // This is a lone chapter
if (vol.length === 0) { if (vol.length === 0) {
return 'Ch ' + this.currentlyReadingChapter.minNumber; return 'Ch ' + this.currentlyReadingChapter.number;
} }
if (this.currentlyReadingChapter.minNumber === "0") { if (this.currentlyReadingChapter.number === "0") {
return 'Vol ' + vol[0].minNumber; return 'Vol ' + vol[0].minNumber;
} }
return 'Vol ' + vol[0].minNumber + ' Ch ' + this.currentlyReadingChapter.minNumber; return 'Vol ' + vol[0].minNumber + ' Ch ' + this.currentlyReadingChapter.number;
} }
return this.currentlyReadingChapter.title; return this.currentlyReadingChapter.title;

View File

@ -115,7 +115,7 @@ export class DownloadService {
case 'volume': case 'volume':
return (downloadEntity as Volume).minNumber + ''; return (downloadEntity as Volume).minNumber + '';
case 'chapter': case 'chapter':
return (downloadEntity as Chapter).minNumber; return (downloadEntity as Chapter).number;
case 'bookmark': case 'bookmark':
return ''; return '';
case 'logs': case 'logs':

View File

@ -43,7 +43,7 @@ export class UtilityService {
sortChapters = (a: Chapter, b: Chapter) => { sortChapters = (a: Chapter, b: Chapter) => {
return parseFloat(a.minNumber) - parseFloat(b.minNumber); return parseFloat(a.number) - parseFloat(b.number);
} }
mangaFormatToText(format: MangaFormat): string { mangaFormatToText(format: MangaFormat): string {