Preparation for Release (#2135)

* Don't allow Comic libraries to do any scrobbling as there aren't any Comic scrobbling providers yet.

* Fixed a bug where if you have multiple libraries pointing the same folder (for whatever reason), the Scan Folder api could be rejected.

* Handle if publication from an epub is empty to avoid a bad parse error

* Cleaned up some hardcoded default strings.

* Fixed up some defaulting code for the cache size.

* Changed how moving something back to on deck works after it's been removed. Now any progress will trigger it, as epubs don't have chapters.

* Ignore .caltrash, which is a Calibre managed folder, when scanning.

* Added the ability to see Volume Last Read Date (or individual chapter) in details drawer. Hover over the clock for the full timestamp.
This commit is contained in:
Joe Milazzo 2023-07-17 08:48:15 -05:00 committed by GitHub
parent 8a6b58d1f8
commit ed4f9e0144
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 66 additions and 40 deletions

View file

@ -26,7 +26,7 @@ export interface Chapter {
* Actual name of the Chapter if populated in underlying metadata
*/
titleName: string;
/**
/**
* Summary for the chapter
*/
summary?: string;
@ -43,4 +43,5 @@ export interface Chapter {
volumeTitle?: string;
webLinks: string;
isbn: string;
lastReadingProgress: string;
}

View file

@ -94,5 +94,14 @@
</app-icon-and-title>
</div>
</ng-container>
<ng-container *ngIf="(chapter.lastReadingProgress | date: 'shortDate') !== '1/1/01'">
<div class="vr d-none d-lg-block m-2"></div>
<div class="col-auto">
<app-icon-and-title label="Last Read" [clickable]="false" fontClasses="fa-regular fa-clock" title="{{chapter.lastReadingProgress | date: 'medium'}}">
{{chapter.lastReadingProgress | date: 'shortDate'}}
</app-icon-and-title>
</div>
</ng-container>
</ng-container>
</div>

View file

@ -1,5 +1,11 @@
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnDestroy, OnInit, inject } from '@angular/core';
import { Subject } from 'rxjs';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
Input,
OnInit,
inject,
} from '@angular/core';
import { UtilityService } from 'src/app/shared/_services/utility.service';
import { Chapter } from 'src/app/_models/chapter';
import { ChapterMetadata } from 'src/app/_models/metadata/chapter-metadata';
@ -26,7 +32,7 @@ import {AgeRatingPipe} from "../../pipe/age-rating.pipe";
styleUrls: ['./entity-info-cards.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class EntityInfoCardsComponent implements OnInit, OnDestroy {
export class EntityInfoCardsComponent implements OnInit {
@Input({required: true}) entity!: Volume | Chapter;
/**
@ -49,7 +55,6 @@ export class EntityInfoCardsComponent implements OnInit, OnDestroy {
readingTime: HourEstimateRange = {maxHours: 1, minHours: 1, avgHours: 1};
size: number = 0;
private readonly onDestroy: Subject<void> = new Subject();
imageService = inject(ImageService);
get LibraryType() {
@ -69,6 +74,8 @@ export class EntityInfoCardsComponent implements OnInit, OnDestroy {
return this.chapter.webLinks.split(',');
}
constructor(private utilityService: UtilityService, private seriesService: SeriesService, private readonly cdRef: ChangeDetectorRef) {}
ngOnInit(): void {
@ -119,8 +126,8 @@ export class EntityInfoCardsComponent implements OnInit, OnDestroy {
this.cdRef.markForCheck();
}
ngOnDestroy(): void {
this.onDestroy.next();
this.onDestroy.complete();
getTimezone(timezone: string): string {
const localDate = new Date(timezone);
return localDate.toLocaleString('en-US', { timeZoneName: 'short' }).split(' ')[3];
}
}

View file

@ -121,17 +121,6 @@ export class DashboardComponent implements OnInit {
}
reloadInProgress(series: Series | number) {
// if (typeof series === 'number') {
// this.loadOnDeck();
// return;
// }
//
// // If the update to Series doesn't affect the requirement to be in this stream, then ignore update request
// const seriesObj = (series as Series);
// if (seriesObj.pagesRead !== seriesObj.pages && seriesObj.pagesRead !== 0) {
// return;
// }
this.loadOnDeck();
}