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

@ -273,7 +273,7 @@ export default {
},
showError() {
if (this.recentEpisode) return false // Dont show podcast error on episode card
return this.numMissingParts || this.isMissing || this.isInvalid
return this.numInvalidAudioFiles || this.numMissingParts || this.isMissing || this.isInvalid
},
isStreaming() {
return this.store.getters['getlibraryItemIdStreaming'] === this.libraryItemId
@ -297,6 +297,10 @@ export default {
if (this.isPodcast) return 0
return this.media.numMissingParts
},
numInvalidAudioFiles() {
if (this.isPodcast) return 0
return this.media.numInvalidAudioFiles
},
errorText() {
if (this.isMissing) return 'Item directory is missing!'
else if (this.isInvalid) {
@ -305,7 +309,11 @@ export default {
}
var txt = ''
if (this.numMissingParts) {
txt = `${this.numMissingParts} missing parts.`
txt += `${this.numMissingParts} missing parts.`
}
if (this.numInvalidAudioFiles) {
if (txt) txt += ' '
txt += `${this.numInvalidAudioFiles} invalid audio files.`
}
return txt || 'Unknown Error'
},

View file

@ -217,7 +217,7 @@ export default {
return ['Finished', 'In Progress', 'Not Started']
},
missing() {
return ['ASIN', 'ISBN', 'Subtitle', 'Author', 'Publish Year', 'Series', 'Volume Number', 'Description', 'Genres', 'Tags', 'Narrator', 'Publisher', 'Language']
return ['ASIN', 'ISBN', 'Subtitle', 'Author', 'Publish Year', 'Series', 'Description', 'Genres', 'Tags', 'Narrator', 'Publisher', 'Language']
},
sublistItems() {
return (this[this.sublist] || []).map((item) => {