Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
C# annotationscbzcomicinfocomicscomics-readercross-platformcsharpepubepub-readerfreelinuxmangamedia-servermetadataopdsopds-feedpdfself-hostedubooquitywindows
Volume relative numbering (#1421)
tjarlsc328f684a09c
diff --git a/API/Services/SeriesService.cs b/API/Services/SeriesService.csindex 6abb8b581..f869ea12a 100644--- a/API/Services/SeriesService.cs+++ b/API/Services/SeriesService.cs@@ -485,8 +485,7 @@ public class SeriesService : ISeriesServiceif (v.Number == 0) return c;c.VolumeTitle = v.Name;return c;- })).ToList();-+ }).OrderBy(c => float.Parse(c.Number), new ChapterSortComparer()));foreach (var chapter in chapters){@@ -505,8 +504,7 @@ public class SeriesService : ISeriesService} else{retChapters = chapters- .Where(ShouldIncludeChapter)- .OrderBy(c => float.Parse(c.Number), new ChapterSortComparer());+ .Where(ShouldIncludeChapter);}var storylineChapters = volumesdiff --git a/UI/Web/src/app/cards/card-item/card-item.component.ts b/UI/Web/src/app/cards/card-item/card-item.component.tsindex 3da1df0d0..af731717a 100644--- a/UI/Web/src/app/cards/card-item/card-item.component.ts+++ b/UI/Web/src/app/cards/card-item/card-item.component.ts@@ -75,8 +75,8 @@ export class CardItemComponent implements OnInit, OnDestroy {*/@Input() suppressArchiveWarning: boolean = false;/**- * The number of updates/items within the card. If less than 2, will not be shown.- */+ * The number of updates/items within the card. If less than 2, will not be shown.+ */@Input() count: number = 0;/*** Additional information to show on the overlay area. Will always render.@@ -99,10 +99,10 @@ export class CardItemComponent implements OnInit, OnDestroy {* Format of the entity (only applies to Series)*/format: MangaFormat = MangaFormat.UNKNOWN;- chapterTitle: string = '';+ tooltipTitle: string = this.title;/**- * This is the download we get from download service.+ * This is the download we get from download service.*/download$: Observable<DownloadEvent | null> | null = null;@@ -118,12 +118,6 @@ export class CardItemComponent implements OnInit, OnDestroy {private user: User | undefined;- get tooltipTitle() {- if (this.chapterTitle === '' || this.chapterTitle === null) return this.title;- return this.chapterTitle;- }--get MangaFormat(): typeof MangaFormat {return MangaFormat;}@@ -158,14 +152,21 @@ export class CardItemComponent implements OnInit, OnDestroy {this.format = (this.entity as Series).format;if (this.utilityService.isChapter(this.entity)) {- this.chapterTitle = this.utilityService.asChapter(this.entity).titleName;+ const chapterTitle = this.utilityService.asChapter(this.entity).titleName;+ if (chapterTitle === '' || chapterTitle === null) {+ this.tooltipTitle = (this.utilityService.asChapter(this.entity).volumeTitle + ' ' + this.title).trim();+ } else {+ this.tooltipTitle = chapterTitle;+ }} else if (this.utilityService.isVolume(this.entity)) {const vol = this.utilityService.asVolume(this.entity);if (vol.chapters !== undefined && vol.chapters.length > 0) {- this.chapterTitle = vol.chapters[0].titleName;+ this.tooltipTitle = vol.chapters[0].titleName;+ }+ if (this.tooltipTitle === '') {+ this.tooltipTitle = vol.name;}}-this.accountService.currentUser$.pipe(takeUntil(this.onDestroy)).subscribe(user => {this.user = user;});diff --git a/UI/Web/src/app/series-detail/series-detail.component.ts b/UI/Web/src/app/series-detail/series-detail.component.tsindex d2084308e..8967929d3 100644--- a/UI/Web/src/app/series-detail/series-detail.component.ts+++ b/UI/Web/src/app/series-detail/series-detail.component.ts@@ -125,7 +125,7 @@ export class SeriesDetailComponent implements OnInit, OnDestroy, AfterContentChe/*** Track by function for Chapter to tell when to refresh card data*/- trackByChapterIdentity = (index: number, item: Chapter) => `${item.title}_${item.number}_${item.pagesRead}`;+ trackByChapterIdentity = (index: number, item: Chapter) => `${item.title}_${item.number}_${item.volumeId}_${item.pagesRead}`;trackByRelatedSeriesIdentiy = (index: number, item: RelatedSeris) => `${item.series.name}_${item.series.libraryId}_${item.series.pagesRead}_${item.relation}`;trackByStoryLineIdentity = (index: number, item: StoryLineItem) => {if (item.isChapter) {