Missing audiobooks flagged not deleted, fix close progress loop on stream errors, clickable download toast, consolidate duplicate track error log, improved scanner to ignore non-audio files

This commit is contained in:
Mark Cooper 2021-09-17 18:40:30 -05:00
parent 0851a1e71e
commit db01db3a2b
15 changed files with 156 additions and 59 deletions

View file

@ -28,6 +28,9 @@ class Audiobook {
this.book = null
this.chapters = []
// Audiobook was scanned and not found
this.isMissing = false
if (audiobook) {
this.construct(audiobook)
}
@ -55,6 +58,8 @@ class Audiobook {
if (audiobook.chapters) {
this.chapters = audiobook.chapters.map(c => ({ ...c }))
}
this.isMissing = !!audiobook.isMissing
}
get title() {
@ -127,7 +132,8 @@ class Audiobook {
tracks: this.tracksToJSON(),
audioFiles: (this.audioFiles || []).map(audioFile => audioFile.toJSON()),
otherFiles: (this.otherFiles || []).map(otherFile => otherFile.toJSON()),
chapters: this.chapters || []
chapters: this.chapters || [],
isMissing: !!this.isMissing
}
}
@ -147,7 +153,8 @@ class Audiobook {
hasMissingParts: this.missingParts ? this.missingParts.length : 0,
hasInvalidParts: this.invalidParts ? this.invalidParts.length : 0,
numTracks: this.tracks.length,
chapters: this.chapters || []
chapters: this.chapters || [],
isMissing: !!this.isMissing
}
}
@ -169,7 +176,8 @@ class Audiobook {
tags: this.tags,
book: this.bookToJSON(),
tracks: this.tracksToJSON(),
chapters: this.chapters || []
chapters: this.chapters || [],
isMissing: !!this.isMissing
}
}