Polishing and Bugfixes (#613)

* Added a new field to Library for showing Last Scan time for a library.

Manage library page now shows last scan for each library. Tweaked the websocket code to make scan progress a bit more reliable.

* Updated docnet to provide ARM support from our recent PR. Pi users can now have a version for PDF support out of the box.

* Parser is now culture invariant to hopefully fix an issue on Italian systems not detecting . correctly

* Added the ability for the collection detail page to update when a new series is added.

* Fixed an issue where multiple chapters stacked in a volume and reading in incognito, wouldn't sort the chapters and would open the wrong one.

* Code smell
This commit is contained in:
Joseph Milazzo 2021-10-01 08:13:55 -07:00 committed by GitHub
parent 1ff1be2eb9
commit ce2f4b6a9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 1267 additions and 160 deletions

View file

@ -20,6 +20,13 @@
</div>
<div>Type: {{libraryType(library.type)}}</div>
<div>Shared Folders: {{library.folders.length + ' folders'}}</div>
<div>
Last Scanned:
<span *ngIf="library.lastScanned == '0001-01-01T00:00:00'; else activeDate">Never</span>
<ng-template #activeDate>
{{library.lastScanned | date: 'MM/dd/yyyy'}}
</ng-template>
</div>
</li>
<li *ngIf="loading" class="list-group-item">
<div class="spinner-border text-secondary" role="status">

View file

@ -2,12 +2,12 @@ import { Component, OnDestroy, OnInit } from '@angular/core';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { ToastrService } from 'ngx-toastr';
import { Subject } from 'rxjs';
import { take, takeUntil } from 'rxjs/operators';
import { take, takeUntil, takeWhile } from 'rxjs/operators';
import { ConfirmService } from 'src/app/shared/confirm.service';
import { ScanLibraryProgressEvent } from 'src/app/_models/events/scan-library-progress-event';
import { Library, LibraryType } from 'src/app/_models/library';
import { LibraryService } from 'src/app/_services/library.service';
import { MessageHubService } from 'src/app/_services/message-hub.service';
import { EVENTS, MessageHubService } from 'src/app/_services/message-hub.service';
import { LibraryEditorModalComponent } from '../_modals/library-editor-modal/library-editor-modal.component';
@Component({
@ -35,9 +35,10 @@ export class ManageLibraryComponent implements OnInit, OnDestroy {
ngOnInit(): void {
this.getLibraries();
this.hubService.scanLibrary.subscribe((event: ScanLibraryProgressEvent) => {
this.scanInProgress[event.libraryId] = event.progress !== 100;
// when a progress event comes in, show it on the UI next to library
this.hubService.messages$.pipe(takeWhile(event => event.event === EVENTS.ScanLibraryProgress)).subscribe((event) => {
const scanEvent = event.payload as ScanLibraryProgressEvent;
this.scanInProgress[scanEvent.libraryId] = scanEvent.progress !== 100;
});
}