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
Last Shakeout (#1342)
Joseph Milazzo041cd22c8f03
diff --git a/API/Services/Tasks/Metadata/WordCountAnalyzerService.cs b/API/Services/Tasks/Metadata/WordCountAnalyzerService.csindex b2d3470a7..8c71b92d3 100644--- a/API/Services/Tasks/Metadata/WordCountAnalyzerService.cs+++ b/API/Services/Tasks/Metadata/WordCountAnalyzerService.cs@@ -219,11 +219,11 @@ public class WordCountAnalyzerService : IWordCountAnalyzerService}+ if (series.WordCount == 0 && series.WordCount != 0) series.WordCount = existingWordCount; // Restore original word count if the file hasn't changedvar seriesEstimate = _readerService.GetTimeEstimate(series.WordCount, series.Pages, isEpub);series.MinHoursToRead = seriesEstimate.MinHours;series.MaxHoursToRead = seriesEstimate.MaxHours;series.AvgHoursToRead = seriesEstimate.AvgHours;- if (series.WordCount == 0) series.WordCount = existingWordCount; // Restore original word count if the file hasn't changed_unitOfWork.SeriesRepository.Update(series);}diff --git a/UI/Web/src/app/manga-reader/manga-reader.component.html b/UI/Web/src/app/manga-reader/manga-reader.component.htmlindex 4aebd4380..a592d684c 100644--- a/UI/Web/src/app/manga-reader/manga-reader.component.html+++ b/UI/Web/src/app/manga-reader/manga-reader.component.html@@ -13,9 +13,6 @@</div></div>- {{readerService.imageUrlToPageNum(this.canvasImage.src)}}- {{readerService.imageUrlToPageNum(this.canvasImage2.src)}}-<div style="margin-left: auto; padding-right: 3%;"><button class="btn btn-icon btn-small" title="Shortcuts" (click)="openShortcutModal()"><i class="fa-regular fa-rectangle-list" aria-hidden="true"></i>@@ -46,7 +43,8 @@<div class="pagination-area"><!-- Pagination controls and screen hints-->- <div class="{{readerMode === ReaderMode.LeftRight ? 'left' : 'top'}} {{clickOverlayClass('left')}}" (click)="handlePageChange($event, 'left')" [ngStyle]="{'height': (readerMode === ReaderMode.LeftRight ? ImageHeight: '25%')}">+ <div class="{{readerMode === ReaderMode.LeftRight ? 'left' : 'top'}} {{clickOverlayClass('left')}}" (click)="handlePageChange($event, 'left')"+ [ngStyle]="{'height': (readerMode === ReaderMode.LeftRight ? ImageHeight: '25%')}"><div *ngIf="showClickOverlay"><i class="fa fa-angle-{{readingDirection === ReadingDirection.RightToLeft ? 'double-' : ''}}{{readerMode === ReaderMode.LeftRight ? 'left' : 'up'}}"title="Previous Page" aria-hidden="true"></i>diff --git a/UI/Web/src/app/manga-reader/manga-reader.component.ts b/UI/Web/src/app/manga-reader/manga-reader.component.tsindex 5cd1f4806..297b94f26 100644--- a/UI/Web/src/app/manga-reader/manga-reader.component.ts+++ b/UI/Web/src/app/manga-reader/manga-reader.component.ts@@ -373,8 +373,8 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {}get ImageHeight() {- // If we are a cover image and implied fit to screen, then we need to take screen height rather than image height- if (this.isCoverImage() || this.FittingOption === FITTING_OPTION.WIDTH) {+ // If we are a wide image and implied fit to screen, then we need to take screen height rather than image height+ if (this.isWideImage() || this.FittingOption === FITTING_OPTION.WIDTH) {return this.WindowHeight;}return this.image?.nativeElement.height + 'px';@@ -995,12 +995,6 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {const notInSplit = this.currentImageSplitPart !== (this.isSplitLeftToRight() ? SPLIT_PAGE_PART.LEFT_PART : SPLIT_PAGE_PART.RIGHT_PART);- // console.log('Current, Next: ', this.readerService.imageUrlToPageNum(this.canvasImage.src), ',', this.readerService.imageUrlToPageNum(this.canvasImageNext.src));- // console.log('Is canvasImage wide: ', this.isWideImage(this.canvasImage));- // console.log('Is canvasImage next wide: ', this.isWideImage(this.canvasImageNext));- // console.log('PRev: ', this.readerService.imageUrlToPageNum(this.canvasImagePrev.src));--let pageAmount = 1;if (this.layoutMode === LayoutMode.Double) {pageAmount = (@@ -1012,7 +1006,6 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {? 2 : 1);} else if (this.layoutMode === LayoutMode.DoubleReversed) {pageAmount = (- //!this.isCoverImage(this.pageNum - 1) && //!this.isWideImage(this.canvasImageNext) &&!this.isWideImage(this.canvasImageAheadBy2) && // Remember we are doing this logic before we've hit the next page, so we need this!this.isSecondLastImage() &&@@ -1054,23 +1047,12 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {let pageAmount = 1;if (this.layoutMode === LayoutMode.Double) {- // Current is current and next is current + 1 (current is the page we are paging from)- // console.log('Current, Next: ', this.readerService.imageUrlToPageNum(this.canvasImage.src), ',', this.readerService.imageUrlToPageNum(this.canvasImageNext.src));- // console.log('Is canvasImage wide: ', this.isWideImage(this.canvasImage));- // console.log('Is canvasImage next wide: ', this.isWideImage(this.canvasImageNext));- // console.log('PRev: ', this.readerService.imageUrlToPageNum(this.canvasImagePrev.src)); // Prev is actually currentPage - 1 on double-pageAmount = (!this.isCoverImage() &&!this.isWideImage(this.canvasImagePrev)? 2 : 1);}if (this.layoutMode === LayoutMode.DoubleReversed) {- // Current is current - 1 and next is current -2 (current is the page we are paging from)- // console.log('Current, Next: ', this.readerService.imageUrlToPageNum(this.canvasImage.src), ',', this.readerService.imageUrlToPageNum(this.canvasImageNext.src));- // console.log('Is canvasImage wide: ', this.isWideImage(this.canvasImage));- // console.log('Is canvasImage next wide: ', this.isWideImage(this.canvasImageNext));- // console.log('PRev: ', this.readerService.imageUrlToPageNum(this.canvasImagePrev.src)); // Prev is actually currentPage + 1 on double reversedpageAmount = (!this.isCoverImage() &&!this.isCoverImage(this.pageNum - 1) &&@@ -1318,8 +1300,6 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {index += 1;}}, this.cachedImages.size() - 3);-- //console.log('cachedImages: ', this.cachedImages.arr.map(img => this.readerService.imageUrlToPageNum(img.src) + ': ' + img.complete));}@@ -1349,16 +1329,6 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {this.canvasImage2.src = this.canvasImagePrev.src;}}-- // console.log('======================================================');- // console.log('Page History: ', this.pageDimensionHistory);- // console.log('Current Page: ', this.pageNum);- // console.log('CanvasImage page: ', this.readerService.imageUrlToPageNum(this.canvasImage.src));- // console.log('CanvasImage2 page: ', this.readerService.imageUrlToPageNum(this.canvasImage2.src));- // console.log('Canvas Image Next:', this.readerService.imageUrlToPageNum(this.canvasImageNext.src));- // console.log('Canvas Image Next Ahead by 2:', this.readerService.imageUrlToPageNum(this.canvasImageAheadBy2.src));- // console.log('Canvas Image Prev:', this.readerService.imageUrlToPageNum(this.canvasImagePrev.src));- // console.log('======================================================');}this.renderPage();this.prefetch();