Fix: show books with invalid audio files and add error icon on book items #491

This commit is contained in:
advplyr 2022-04-24 18:05:15 -05:00
parent 5389115120
commit 4bc7cd2045
5 changed files with 27 additions and 10 deletions

View file

@ -65,6 +65,7 @@ class Book {
numAudioFiles: this.audioFiles.length,
numChapters: this.chapters.length,
numMissingParts: this.missingParts.length,
numInvalidAudioFiles: this.invalidAudioFiles.length,
duration: this.duration,
size: this.size,
ebookFormat: this.ebookFile ? this.ebookFile.ebookFormat : null
@ -106,8 +107,11 @@ class Book {
get hasEmbeddedCoverArt() {
return this.audioFiles.some(af => af.embeddedCoverArt)
}
get invalidAudioFiles() {
return this.audioFiles.filter(af => af.invalid)
}
get hasIssues() {
return this.missingParts.length || this.audioFiles.some(af => af.invalid)
return this.missingParts.length || this.invalidAudioFiles.length
}
get tracks() {
var startOffset = 0