Book Reader Issue Take 2 (#916)

* Implemented Publication Status in SeriesMetadata and the ability to filter it.

* Updated the docs for Language on metadata to specify it's a BCP-47 code to match Anansi Project. Fixed a bug with reader from previous PR.
This commit is contained in:
Joseph Milazzo 2022-01-08 16:17:04 -08:00 committed by GitHub
parent 194fe8318c
commit a2364285b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -40,7 +40,7 @@ namespace API.DTOs
/// </summary>
public int ReleaseYear { get; set; }
/// <summary>
/// Language of the content (ISO 639-1 code)
/// Language of the content (BCP-47 code)
/// </summary>
public string Language { get; set; } = string.Empty;
/// <summary>

View File

@ -32,7 +32,7 @@ namespace API.Entities.Metadata
/// </summary>
public int ReleaseYear { get; set; }
/// <summary>
/// Language of the content (ISO 639-1 code)
/// Language of the content (BCP-47 code)
/// </summary>
public string Language { get; set; } = string.Empty;
/// <summary>

View File

@ -752,7 +752,7 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
setPageNum(pageNum: number) {
if (pageNum < 0) {
this.pageNum = 0;
} else if (pageNum >= this.maxPages - 1) {
} else if (pageNum >= this.maxPages) {
this.pageNum = this.maxPages - 1;
} else {
this.pageNum = pageNum;
@ -812,13 +812,14 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
this.setPageNum(this.pageNum - 1);
}
if (this.pageNum === this.maxPages - 1) {
if (oldPageNum + 1 === this.maxPages) {
// Move to next volume/chapter automatically
this.loadNextChapter();
}
if (oldPageNum === this.pageNum) { return; }
this.loadPage();
}