From ff5226fa9369b599b2b10cc2c1fe7579a1ceb902 Mon Sep 17 00:00:00 2001 From: advplyr Date: Thu, 21 Mar 2024 14:38:52 -0500 Subject: [PATCH] Update:Remove unused missing/invalid audiobook parts logic and keys --- client/components/cards/LazyBookCard.vue | 20 +---- client/components/widgets/AudiobookData.vue | 84 --------------------- client/pages/audiobook/_id/chapters.vue | 2 +- client/pages/audiobook/_id/edit.vue | 3 - client/pages/audiobook/_id/manage.vue | 2 +- client/pages/item/_id/index.vue | 18 ++--- client/strings/cs.json | 2 - client/strings/da.json | 2 - client/strings/de.json | 2 - client/strings/en-us.json | 2 - client/strings/es.json | 2 - client/strings/et.json | 2 - client/strings/fr.json | 2 - client/strings/gu.json | 2 - client/strings/he.json | 2 - client/strings/hi.json | 2 - client/strings/hr.json | 2 - client/strings/hu.json | 2 - client/strings/it.json | 4 +- client/strings/lt.json | 2 - client/strings/nl.json | 2 - client/strings/no.json | 2 - client/strings/pl.json | 2 - client/strings/pt-br.json | 4 +- client/strings/ru.json | 2 - client/strings/sv.json | 2 - client/strings/uk.json | 4 +- client/strings/vi-vn.json | 2 - client/strings/zh-cn.json | 2 - client/strings/zh-tw.json | 6 +- server/models/Book.js | 2 +- server/objects/files/AudioFile.js | 7 -- server/objects/mediaTypes/Book.js | 13 +--- 33 files changed, 19 insertions(+), 190 deletions(-) delete mode 100644 client/components/widgets/AudiobookData.vue diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue index 42b020e327..efeb0165c4 100644 --- a/client/components/cards/LazyBookCard.vue +++ b/client/components/cards/LazyBookCard.vue @@ -358,7 +358,7 @@ export default { }, showError() { if (this.recentEpisode) return false // Dont show podcast error on episode card - return this.numInvalidAudioFiles || this.numMissingParts || this.isMissing || this.isInvalid + return this.isMissing || this.isInvalid }, libraryItemIdStreaming() { return this.store.getters['getLibraryItemIdStreaming'] @@ -388,29 +388,13 @@ export default { isInvalid() { return this._libraryItem.isInvalid }, - numMissingParts() { - 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) { if (this.isPodcast) return 'Podcast has no episodes' return 'Item has no audio tracks & ebook' } - let txt = '' - if (this.numMissingParts) { - txt += `${this.numMissingParts} missing parts.` - } - if (this.numInvalidAudioFiles) { - if (txt) txt += ' ' - txt += `${this.numInvalidAudioFiles} invalid audio files.` - } - return txt || 'Unknown Error' + return 'Unknown Error' }, overlayWrapperClasslist() { const classes = [] diff --git a/client/components/widgets/AudiobookData.vue b/client/components/widgets/AudiobookData.vue deleted file mode 100644 index 8309faca5c..0000000000 --- a/client/components/widgets/AudiobookData.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - \ No newline at end of file diff --git a/client/pages/audiobook/_id/chapters.vue b/client/pages/audiobook/_id/chapters.vue index 0f5db77ad6..ef4bbee402 100644 --- a/client/pages/audiobook/_id/chapters.vue +++ b/client/pages/audiobook/_id/chapters.vue @@ -281,7 +281,7 @@ export default { return this.media.audioFiles || [] }, audioTracks() { - return this.audioFiles.filter((af) => !af.exclude && !af.invalid) + return this.audioFiles.filter((af) => !af.exclude) }, selectedChapterId() { return this.selectedChapter ? this.selectedChapter.id : null diff --git a/client/pages/audiobook/_id/edit.vue b/client/pages/audiobook/_id/edit.vue index f6d4879d03..69e96bf85d 100644 --- a/client/pages/audiobook/_id/edit.vue +++ b/client/pages/audiobook/_id/edit.vue @@ -137,9 +137,6 @@ export default { }) return count }, - missingParts() { - return this.media.missingParts || [] - }, libraryItemId() { return this.libraryItem.id }, diff --git a/client/pages/audiobook/_id/manage.vue b/client/pages/audiobook/_id/manage.vue index 965f8c2560..03c214b451 100644 --- a/client/pages/audiobook/_id/manage.vue +++ b/client/pages/audiobook/_id/manage.vue @@ -249,7 +249,7 @@ export default { return this.media.metadata || {} }, audioFiles() { - return (this.media.audioFiles || []).filter((af) => !af.exclude && !af.invalid) + return (this.media.audioFiles || []).filter((af) => !af.exclude) }, isSingleM4b() { return this.audioFiles.length === 1 && this.audioFiles[0].metadata.ext.toLowerCase() === '.m4b' diff --git a/client/pages/item/_id/index.vue b/client/pages/item/_id/index.vue index 8c78d97d93..b4b58bda0b 100644 --- a/client/pages/item/_id/index.vue +++ b/client/pages/item/_id/index.vue @@ -131,15 +131,9 @@ -
-

Invalid audio files

- -

- {{ audioFile.metadata.filename }} ({{ audioFile.error }})

-
- - + @@ -239,10 +233,6 @@ export default { isAbridged() { return !!this.mediaMetadata.abridged }, - invalidAudioFiles() { - if (!this.isBook) return [] - return this.libraryItem.media.audioFiles.filter((af) => af.invalid) - }, showPlayButton() { if (this.isMissing || this.isInvalid) return false if (this.isMusic) return !!this.audioFile @@ -275,6 +265,12 @@ export default { tracks() { return this.media.tracks || [] }, + tracksWithAudioFile() { + return this.tracks.map((track) => { + track.audioFile = this.media.audioFiles?.find((af) => af.metadata.path === track.metadata.path) + return track + }) + }, podcastEpisodes() { return this.media.episodes || [] }, diff --git a/client/strings/cs.json b/client/strings/cs.json index 4ce358a2cb..6e935617e8 100644 --- a/client/strings/cs.json +++ b/client/strings/cs.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Každých 6 hodin", "LabelIntervalEveryDay": "Každý den", "LabelIntervalEveryHour": "Každou hodinu", - "LabelInvalidParts": "Neplatné části", "LabelInvert": "Invertovat", "LabelItem": "Položka", "LabelLanguage": "Jazyk", @@ -357,7 +356,6 @@ "LabelMinute": "Minuta", "LabelMissing": "Chybějící", "LabelMissingEbook": "Has no ebook", - "LabelMissingParts": "Chybějící díly", "LabelMissingSupplementaryEbook": "Has no supplementary ebook", "LabelMobileRedirectURIs": "Allowed Mobile Redirect URIs", "LabelMobileRedirectURIsDescription": "This is a whitelist of valid redirect URIs for mobile apps. The default one is audiobookshelf://oauth, which you can remove or supplement with additional URIs for third-party app integration. Using an asterisk (*) as the sole entry permits any URI.", diff --git a/client/strings/da.json b/client/strings/da.json index de00a1fc20..ea69844cac 100644 --- a/client/strings/da.json +++ b/client/strings/da.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Hver 6. time", "LabelIntervalEveryDay": "Hver dag", "LabelIntervalEveryHour": "Hver time", - "LabelInvalidParts": "Ugyldige dele", "LabelInvert": "Inverter", "LabelItem": "Element", "LabelLanguage": "Sprog", @@ -357,7 +356,6 @@ "LabelMinute": "Minut", "LabelMissing": "Mangler", "LabelMissingEbook": "Has no ebook", - "LabelMissingParts": "Manglende dele", "LabelMissingSupplementaryEbook": "Has no supplementary ebook", "LabelMobileRedirectURIs": "Allowed Mobile Redirect URIs", "LabelMobileRedirectURIsDescription": "This is a whitelist of valid redirect URIs for mobile apps. The default one is audiobookshelf://oauth, which you can remove or supplement with additional URIs for third-party app integration. Using an asterisk (*) as the sole entry permits any URI.", diff --git a/client/strings/de.json b/client/strings/de.json index ed99f095e8..207bc3998b 100644 --- a/client/strings/de.json +++ b/client/strings/de.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Alle 6 Stunden", "LabelIntervalEveryDay": "Jeden Tag", "LabelIntervalEveryHour": "Jede Stunde", - "LabelInvalidParts": "Ungültige Teile", "LabelInvert": "Umkehren", "LabelItem": "Medium", "LabelLanguage": "Sprache", @@ -357,7 +356,6 @@ "LabelMinute": "Minute", "LabelMissing": "Fehlend", "LabelMissingEbook": "E-Book fehlt", - "LabelMissingParts": "Fehlende Teile", "LabelMissingSupplementaryEbook": "Ergänzendes E-Book fehlt", "LabelMobileRedirectURIs": "Erlaubte Weiterleitungs-URIs für die mobile App", "LabelMobileRedirectURIsDescription": "Dies ist eine Whitelist gültiger Umleitungs-URIs für mobile Apps. Der Standardwert ist audiobookshelf://oauth, den du entfernen oder durch zusätzliche URIs für die Integration von Drittanbieter-Apps ergänzen kannst. Die Verwendung eines Sternchens (*) als alleiniger Eintrag erlaubt jede URI.", diff --git a/client/strings/en-us.json b/client/strings/en-us.json index 43a1ef4482..bba4669bde 100644 --- a/client/strings/en-us.json +++ b/client/strings/en-us.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Every 6 hours", "LabelIntervalEveryDay": "Every day", "LabelIntervalEveryHour": "Every hour", - "LabelInvalidParts": "Invalid Parts", "LabelInvert": "Invert", "LabelItem": "Item", "LabelLanguage": "Language", @@ -357,7 +356,6 @@ "LabelMinute": "Minute", "LabelMissing": "Missing", "LabelMissingEbook": "Has no ebook", - "LabelMissingParts": "Missing Parts", "LabelMissingSupplementaryEbook": "Has no supplementary ebook", "LabelMobileRedirectURIs": "Allowed Mobile Redirect URIs", "LabelMobileRedirectURIsDescription": "This is a whitelist of valid redirect URIs for mobile apps. The default one is audiobookshelf://oauth, which you can remove or supplement with additional URIs for third-party app integration. Using an asterisk (*) as the sole entry permits any URI.", diff --git a/client/strings/es.json b/client/strings/es.json index 068c5bc4e0..b791a4728e 100644 --- a/client/strings/es.json +++ b/client/strings/es.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Cada 6 Horas", "LabelIntervalEveryDay": "Cada Día", "LabelIntervalEveryHour": "Cada Hora", - "LabelInvalidParts": "Partes Inválidas", "LabelInvert": "Invertir", "LabelItem": "Elemento", "LabelLanguage": "Lenguaje", @@ -357,7 +356,6 @@ "LabelMinute": "Minuto", "LabelMissing": "Ausente", "LabelMissingEbook": "Has no ebook", - "LabelMissingParts": "Partes Ausentes", "LabelMissingSupplementaryEbook": "Has no supplementary ebook", "LabelMobileRedirectURIs": "URIs de redirección a móviles permitidos", "LabelMobileRedirectURIsDescription": "Esta es una lista de URIs válidos para redireccionamiento de apps móviles. La URI por defecto es audiobookshelf://oauth, la cual puedes remover or corroborar con URIs adicionales para la integración con apps de terceros. Utilizando un asterisco (*) como el único punto de entrada permite cualquier URI.", diff --git a/client/strings/et.json b/client/strings/et.json index da1450273f..9aa0d0db51 100644 --- a/client/strings/et.json +++ b/client/strings/et.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Iga 6 tunni tagant", "LabelIntervalEveryDay": "Iga päev", "LabelIntervalEveryHour": "Iga tunni tagant", - "LabelInvalidParts": "Vigased osad", "LabelInvert": "Pööra ümber", "LabelItem": "Kirje", "LabelLanguage": "Keel", @@ -357,7 +356,6 @@ "LabelMinute": "Minut", "LabelMissing": "Puudub", "LabelMissingEbook": "Has no ebook", - "LabelMissingParts": "Puuduvad osad", "LabelMissingSupplementaryEbook": "Has no supplementary ebook", "LabelMobileRedirectURIs": "Lubatud mobiilile suunamise URI-d", "LabelMobileRedirectURIsDescription": "See on mobiilirakenduste jaoks kehtivate suunamise URI-de lubatud nimekiri. Vaikimisi on selleks audiobookshelf://oauth, mida saate eemaldada või täiendada täiendavate URI-dega kolmanda osapoole rakenduste integreerimiseks. Tärni (*) ainukese kirjena kasutamine võimaldab mis tahes URI-d.", diff --git a/client/strings/fr.json b/client/strings/fr.json index b7b284725c..516a2f327e 100644 --- a/client/strings/fr.json +++ b/client/strings/fr.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Toutes les 6 heures", "LabelIntervalEveryDay": "Tous les jours", "LabelIntervalEveryHour": "Toutes les heures", - "LabelInvalidParts": "Parties invalides", "LabelInvert": "Inverser", "LabelItem": "Article", "LabelLanguage": "Langue", @@ -357,7 +356,6 @@ "LabelMinute": "Minute", "LabelMissing": "Manquant", "LabelMissingEbook": "Has no ebook", - "LabelMissingParts": "Parties manquantes", "LabelMissingSupplementaryEbook": "Has no supplementary ebook", "LabelMobileRedirectURIs": "URI de redirection mobile autorisés", "LabelMobileRedirectURIsDescription": "Il s'agit d'une liste blanche d’URI de redirection valides pour les applications mobiles. Celui par défaut est audiobookshelf://oauth, que vous pouvez supprimer ou compléter avec des URIs supplémentaires pour l'intégration d'applications tierces. L’utilisation d’un astérisque (*) comme seule entrée autorise n’importe quel URI.", diff --git a/client/strings/gu.json b/client/strings/gu.json index 0a2dc3b692..0cf6d86d3d 100644 --- a/client/strings/gu.json +++ b/client/strings/gu.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Every 6 hours", "LabelIntervalEveryDay": "Every day", "LabelIntervalEveryHour": "Every hour", - "LabelInvalidParts": "Invalid Parts", "LabelInvert": "Invert", "LabelItem": "Item", "LabelLanguage": "Language", @@ -357,7 +356,6 @@ "LabelMinute": "Minute", "LabelMissing": "Missing", "LabelMissingEbook": "Has no ebook", - "LabelMissingParts": "Missing Parts", "LabelMissingSupplementaryEbook": "Has no supplementary ebook", "LabelMobileRedirectURIs": "Allowed Mobile Redirect URIs", "LabelMobileRedirectURIsDescription": "This is a whitelist of valid redirect URIs for mobile apps. The default one is audiobookshelf://oauth, which you can remove or supplement with additional URIs for third-party app integration. Using an asterisk (*) as the sole entry permits any URI.", diff --git a/client/strings/he.json b/client/strings/he.json index 435f60ad75..63bd3339e6 100644 --- a/client/strings/he.json +++ b/client/strings/he.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "כל 6 שעות", "LabelIntervalEveryDay": "כל יום", "LabelIntervalEveryHour": "כל שעה", - "LabelInvalidParts": "חלקים לא תקינים", "LabelInvert": "הפוך", "LabelItem": "פריט", "LabelLanguage": "שפה", @@ -357,7 +356,6 @@ "LabelMinute": "דקה", "LabelMissing": "חסר", "LabelMissingEbook": "אין ספר אלקטרוני", - "LabelMissingParts": "חלקים חסרים", "LabelMissingSupplementaryEbook": "אין ספר אלקטרוני נלווה", "LabelMobileRedirectURIs": "כתובות משדר ניידות מורשות", "LabelMobileRedirectURIsDescription": "זהו רשימה לבניה של כתובות ה-URI הנתמכות להפניות עבור אפליקציות ניידות. הברירת מחדל היא audiobookshelf://oauth, שניתן להסיר או להוסיף לה כתובות נוספות לאינטגרציה עם אפליקציות צד שלישי. שימוש בכוכבית (*) כקלט בודד מאפשר כל URI.", diff --git a/client/strings/hi.json b/client/strings/hi.json index 4e8aae7b69..3859f3d753 100644 --- a/client/strings/hi.json +++ b/client/strings/hi.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Every 6 hours", "LabelIntervalEveryDay": "Every day", "LabelIntervalEveryHour": "Every hour", - "LabelInvalidParts": "Invalid Parts", "LabelInvert": "Invert", "LabelItem": "Item", "LabelLanguage": "Language", @@ -357,7 +356,6 @@ "LabelMinute": "Minute", "LabelMissing": "Missing", "LabelMissingEbook": "Has no ebook", - "LabelMissingParts": "Missing Parts", "LabelMissingSupplementaryEbook": "Has no supplementary ebook", "LabelMobileRedirectURIs": "Allowed Mobile Redirect URIs", "LabelMobileRedirectURIsDescription": "This is a whitelist of valid redirect URIs for mobile apps. The default one is audiobookshelf://oauth, which you can remove or supplement with additional URIs for third-party app integration. Using an asterisk (*) as the sole entry permits any URI.", diff --git a/client/strings/hr.json b/client/strings/hr.json index fa5bcd353c..3c81c88d96 100644 --- a/client/strings/hr.json +++ b/client/strings/hr.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Every 6 hours", "LabelIntervalEveryDay": "Every day", "LabelIntervalEveryHour": "Every hour", - "LabelInvalidParts": "Nevaljajuči dijelovi", "LabelInvert": "Invert", "LabelItem": "Stavka", "LabelLanguage": "Jezik", @@ -357,7 +356,6 @@ "LabelMinute": "Minuta", "LabelMissing": "Nedostaje", "LabelMissingEbook": "Has no ebook", - "LabelMissingParts": "Nedostajali dijelovi", "LabelMissingSupplementaryEbook": "Has no supplementary ebook", "LabelMobileRedirectURIs": "Allowed Mobile Redirect URIs", "LabelMobileRedirectURIsDescription": "This is a whitelist of valid redirect URIs for mobile apps. The default one is audiobookshelf://oauth, which you can remove or supplement with additional URIs for third-party app integration. Using an asterisk (*) as the sole entry permits any URI.", diff --git a/client/strings/hu.json b/client/strings/hu.json index f7e2abd8d3..c5eec3c74b 100644 --- a/client/strings/hu.json +++ b/client/strings/hu.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Minden 6 órában", "LabelIntervalEveryDay": "Minden nap", "LabelIntervalEveryHour": "Minden órában", - "LabelInvalidParts": "Érvénytelen részek", "LabelInvert": "Megfordítás", "LabelItem": "Elem", "LabelLanguage": "Nyelv", @@ -357,7 +356,6 @@ "LabelMinute": "Perc", "LabelMissing": "Hiányzó", "LabelMissingEbook": "Has no ebook", - "LabelMissingParts": "Hiányzó részek", "LabelMissingSupplementaryEbook": "Has no supplementary ebook", "LabelMobileRedirectURIs": "Engedélyezett mobil átirányítási URI-k", "LabelMobileRedirectURIsDescription": "Ez egy fehérlista az érvényes mobilalkalmazás-átirányítási URI-k számára. Az alapértelmezett audiobookshelf://oauth, amely eltávolítható vagy kiegészíthető további URI-kkal harmadik féltől származó alkalmazásintegráció érdekében. Ha az egyetlen bejegyzés egy csillag (*), akkor bármely URI engedélyezett.", diff --git a/client/strings/it.json b/client/strings/it.json index bd6e5fa91b..22c0503a12 100644 --- a/client/strings/it.json +++ b/client/strings/it.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Ogni 6 ore", "LabelIntervalEveryDay": "Ogni Giorno", "LabelIntervalEveryHour": "Ogni ora", - "LabelInvalidParts": "Parti Invalide", "LabelInvert": "Inverti", "LabelItem": "Oggetti", "LabelLanguage": "Lingua", @@ -357,7 +356,6 @@ "LabelMinute": "Minuto", "LabelMissing": "Altro", "LabelMissingEbook": "Non ha ebook", - "LabelMissingParts": "Parti rimanenti", "LabelMissingSupplementaryEbook": "Non ha ebook supplementare", "LabelMobileRedirectURIs": "URI di reindirizzamento mobile consentiti", "LabelMobileRedirectURIsDescription": "Questa è una lista bianca di URI di reindirizzamento validi per le app mobili. Quello predefinito è audiobookshelf://oauth, che puoi rimuovere o integrare con URI aggiuntivi per l'integrazione di app di terze parti. Utilizzando un asterisco (*) poiché l'unica voce consente qualsiasi URI.", @@ -778,4 +776,4 @@ "ToastSocketFailedToConnect": "Socket non riesce a connettersi", "ToastUserDeleteFailed": "Errore eliminazione utente", "ToastUserDeleteSuccess": "Utente eliminato" -} +} \ No newline at end of file diff --git a/client/strings/lt.json b/client/strings/lt.json index d36861a42c..3eaba010bf 100644 --- a/client/strings/lt.json +++ b/client/strings/lt.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Kas 6 valandas", "LabelIntervalEveryDay": "Kasdien", "LabelIntervalEveryHour": "Kiekvieną valandą", - "LabelInvalidParts": "Netinkamos dalys", "LabelInvert": "Apversti", "LabelItem": "Elementas", "LabelLanguage": "Kalba", @@ -357,7 +356,6 @@ "LabelMinute": "Minutė", "LabelMissing": "Trūksta", "LabelMissingEbook": "Has no ebook", - "LabelMissingParts": "Trūkstamos dalys", "LabelMissingSupplementaryEbook": "Has no supplementary ebook", "LabelMobileRedirectURIs": "Allowed Mobile Redirect URIs", "LabelMobileRedirectURIsDescription": "This is a whitelist of valid redirect URIs for mobile apps. The default one is audiobookshelf://oauth, which you can remove or supplement with additional URIs for third-party app integration. Using an asterisk (*) as the sole entry permits any URI.", diff --git a/client/strings/nl.json b/client/strings/nl.json index b8d3f66979..fb746672aa 100644 --- a/client/strings/nl.json +++ b/client/strings/nl.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Iedere 6 uur", "LabelIntervalEveryDay": "Iedere dag", "LabelIntervalEveryHour": "Ieder uur", - "LabelInvalidParts": "Ongeldige delen", "LabelInvert": "Omdraaien", "LabelItem": "Onderdeel", "LabelLanguage": "Taal", @@ -357,7 +356,6 @@ "LabelMinute": "Minuut", "LabelMissing": "Ontbrekend", "LabelMissingEbook": "Has no ebook", - "LabelMissingParts": "Ontbrekende delen", "LabelMissingSupplementaryEbook": "Has no supplementary ebook", "LabelMobileRedirectURIs": "Allowed Mobile Redirect URIs", "LabelMobileRedirectURIsDescription": "This is a whitelist of valid redirect URIs for mobile apps. The default one is audiobookshelf://oauth, which you can remove or supplement with additional URIs for third-party app integration. Using an asterisk (*) as the sole entry permits any URI.", diff --git a/client/strings/no.json b/client/strings/no.json index 818ee0fa5d..b66ab6f359 100644 --- a/client/strings/no.json +++ b/client/strings/no.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Hver 6. timer", "LabelIntervalEveryDay": "Hver dag", "LabelIntervalEveryHour": "Hver time", - "LabelInvalidParts": "Ugyldige deler", "LabelInvert": "Inverter", "LabelItem": "Enhet", "LabelLanguage": "Språk", @@ -357,7 +356,6 @@ "LabelMinute": "Minutt", "LabelMissing": "Mangler", "LabelMissingEbook": "Has no ebook", - "LabelMissingParts": "Manglende deler", "LabelMissingSupplementaryEbook": "Has no supplementary ebook", "LabelMobileRedirectURIs": "Allowed Mobile Redirect URIs", "LabelMobileRedirectURIsDescription": "This is a whitelist of valid redirect URIs for mobile apps. The default one is audiobookshelf://oauth, which you can remove or supplement with additional URIs for third-party app integration. Using an asterisk (*) as the sole entry permits any URI.", diff --git a/client/strings/pl.json b/client/strings/pl.json index cf4274cc28..e1d7f289c4 100644 --- a/client/strings/pl.json +++ b/client/strings/pl.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Co 6 godzin", "LabelIntervalEveryDay": "Każdego dnia", "LabelIntervalEveryHour": "Każdej godziny", - "LabelInvalidParts": "Nieprawidłowe części", "LabelInvert": "Invert", "LabelItem": "Pozycja", "LabelLanguage": "Język", @@ -357,7 +356,6 @@ "LabelMinute": "Minuta", "LabelMissing": "Brakujący", "LabelMissingEbook": "Has no ebook", - "LabelMissingParts": "Brakujące cześci", "LabelMissingSupplementaryEbook": "Has no supplementary ebook", "LabelMobileRedirectURIs": "Allowed Mobile Redirect URIs", "LabelMobileRedirectURIsDescription": "This is a whitelist of valid redirect URIs for mobile apps. The default one is audiobookshelf://oauth, which you can remove or supplement with additional URIs for third-party app integration. Using an asterisk (*) as the sole entry permits any URI.", diff --git a/client/strings/pt-br.json b/client/strings/pt-br.json index c4d00eb741..47edcfac7a 100644 --- a/client/strings/pt-br.json +++ b/client/strings/pt-br.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "A cada 6 horas", "LabelIntervalEveryDay": "Todo dia", "LabelIntervalEveryHour": "Toda hora", - "LabelInvalidParts": "Partes Inválidas", "LabelInvert": "Inverter", "LabelItem": "Item", "LabelLanguage": "Idioma", @@ -357,7 +356,6 @@ "LabelMinute": "Minuto", "LabelMissing": "Ausente", "LabelMissingEbook": "Ebook não existe", - "LabelMissingParts": "Partes Ausentes", "LabelMissingSupplementaryEbook": "Ebook complementar não existe", "LabelMobileRedirectURIs": "URIs de redirecionamento móveis permitidas", "LabelMobileRedirectURIsDescription": "Essa é uma lista de permissionamento para URIs válidas para o redirecionamento de aplicativos móveis. A padrão é audiobookshelf://oauth, que pode ser removida ou acrescentada com novas URIs para integração com apps de terceiros. Usando um asterisco (*) como um item único dará permissão para qualquer URI.", @@ -778,4 +776,4 @@ "ToastSocketFailedToConnect": "Falha na conexão do socket", "ToastUserDeleteFailed": "Falha ao apagar usuário", "ToastUserDeleteSuccess": "Usuário apagado" -} +} \ No newline at end of file diff --git a/client/strings/ru.json b/client/strings/ru.json index a55e4668ba..9388739d14 100644 --- a/client/strings/ru.json +++ b/client/strings/ru.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Каждые 6 часов", "LabelIntervalEveryDay": "Каждый день", "LabelIntervalEveryHour": "Каждый час", - "LabelInvalidParts": "Неверные части", "LabelInvert": "Инвертировать", "LabelItem": "Элемент", "LabelLanguage": "Язык", @@ -357,7 +356,6 @@ "LabelMinute": "Минуты", "LabelMissing": "Потеряно", "LabelMissingEbook": "Has no ebook", - "LabelMissingParts": "Потерянные части", "LabelMissingSupplementaryEbook": "Has no supplementary ebook", "LabelMobileRedirectURIs": "Разрешенные URI перенаправления с мобильных устройств", "LabelMobileRedirectURIsDescription": "Это белый список допустимых URI перенаправления для мобильных приложений. По умолчанию используется audiobookshelf://oauth, который можно удалить или дополнить дополнительными URI для интеграции со сторонними приложениями. Использование звездочки (*) в качестве единственной записи разрешает любой URI.", diff --git a/client/strings/sv.json b/client/strings/sv.json index 820fe18a3c..b16f6aec44 100644 --- a/client/strings/sv.json +++ b/client/strings/sv.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Var 6:e timme", "LabelIntervalEveryDay": "Varje dag", "LabelIntervalEveryHour": "Varje timme", - "LabelInvalidParts": "Ogiltiga delar", "LabelInvert": "Invertera", "LabelItem": "Objekt", "LabelLanguage": "Språk", @@ -357,7 +356,6 @@ "LabelMinute": "Minut", "LabelMissing": "Saknad", "LabelMissingEbook": "Has no ebook", - "LabelMissingParts": "Saknade delar", "LabelMissingSupplementaryEbook": "Has no supplementary ebook", "LabelMobileRedirectURIs": "Allowed Mobile Redirect URIs", "LabelMobileRedirectURIsDescription": "This is a whitelist of valid redirect URIs for mobile apps. The default one is audiobookshelf://oauth, which you can remove or supplement with additional URIs for third-party app integration. Using an asterisk (*) as the sole entry permits any URI.", diff --git a/client/strings/uk.json b/client/strings/uk.json index 9953bda5e9..7c0d447658 100644 --- a/client/strings/uk.json +++ b/client/strings/uk.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Кожні 6 годин", "LabelIntervalEveryDay": "Щодня", "LabelIntervalEveryHour": "Щогодини", - "LabelInvalidParts": "Недопустимі частини", "LabelInvert": "Інвертувати", "LabelItem": "Елемент", "LabelLanguage": "Мова", @@ -357,7 +356,6 @@ "LabelMinute": "Хвилина", "LabelMissing": "Бракує", "LabelMissingEbook": "Без електронної книги", - "LabelMissingParts": "Відсутні частини", "LabelMissingSupplementaryEbook": "Без додаткової електронної книги", "LabelMobileRedirectURIs": "Дозволені адреси перенаправлення", "LabelMobileRedirectURIsDescription": "Це білий список наявних URI, що перенаправляють у мобільний додаток. За замовчуванням це audiobookshelf://oauth, який ви можете видалити або ж додати інші адреси для сторонніх інтеграцій. Використайте зірочку (*), аби дозволити будь-яке URI.", @@ -778,4 +776,4 @@ "ToastSocketFailedToConnect": "Не вдалося під'єднатися до сокета", "ToastUserDeleteFailed": "Не вдалося видалити користувача", "ToastUserDeleteSuccess": "Користувача видалено" -} +} \ No newline at end of file diff --git a/client/strings/vi-vn.json b/client/strings/vi-vn.json index bddfd64776..1f35667601 100644 --- a/client/strings/vi-vn.json +++ b/client/strings/vi-vn.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "Mỗi 6 giờ", "LabelIntervalEveryDay": "Mỗi ngày", "LabelIntervalEveryHour": "Mỗi giờ", - "LabelInvalidParts": "Phần không hợp lệ", "LabelInvert": "Nghịch đảo", "LabelItem": "Mục", "LabelLanguage": "Ngôn ngữ", @@ -357,7 +356,6 @@ "LabelMinute": "Phút", "LabelMissing": "Thiếu", "LabelMissingEbook": "Không có ebook", - "LabelMissingParts": "Các phần thiếu", "LabelMissingSupplementaryEbook": "Không có ebook bổ sung", "LabelMobileRedirectURIs": "URI chuyển hướng di động được cho phép", "LabelMobileRedirectURIsDescription": "Đây là danh sách trắng các URI chuyển hướng hợp lệ cho ứng dụng di động. Mặc định là audiobookshelf://oauth, bạn có thể loại bỏ hoặc bổ sung thêm các URI cho tích hợp ứng dụng bên thứ ba. Sử dụng dấu hoa thị (*) như một mục duy nhất cho phép bất kỳ URI nào.", diff --git a/client/strings/zh-cn.json b/client/strings/zh-cn.json index bf816f89af..2dc1ab16f3 100644 --- a/client/strings/zh-cn.json +++ b/client/strings/zh-cn.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "每 6 小时", "LabelIntervalEveryDay": "每天", "LabelIntervalEveryHour": "每小时", - "LabelInvalidParts": "无效部件", "LabelInvert": "倒转", "LabelItem": "项目", "LabelLanguage": "语言", @@ -357,7 +356,6 @@ "LabelMinute": "分钟", "LabelMissing": "丢失", "LabelMissingEbook": "Has no ebook", - "LabelMissingParts": "丢失的部分", "LabelMissingSupplementaryEbook": "Has no supplementary ebook", "LabelMobileRedirectURIs": "允许移动应用重定向 URI", "LabelMobileRedirectURIsDescription": "这是移动应用程序的有效重定向 URI 白名单. 默认值为 audiobookshelf://oauth,您可以删除它或添加其他 URI 以进行第三方应用集成. 使用星号 (*) 作为唯一条目允许任何 URI.", diff --git a/client/strings/zh-tw.json b/client/strings/zh-tw.json index 5a9afc98b8..2332191157 100644 --- a/client/strings/zh-tw.json +++ b/client/strings/zh-tw.json @@ -320,7 +320,6 @@ "LabelIntervalEvery6Hours": "每 6 小時", "LabelIntervalEveryDay": "每天", "LabelIntervalEveryHour": "每小時", - "LabelInvalidParts": "無效部件", "LabelInvert": "倒轉", "LabelItem": "項目", "LabelLanguage": "語言", @@ -357,7 +356,6 @@ "LabelMinute": "分鐘", "LabelMissing": "丟失", "LabelMissingEbook": "Has no ebook", - "LabelMissingParts": "丟失的部分", "LabelMissingSupplementaryEbook": "Has no supplementary ebook", "LabelMobileRedirectURIs": "允許移動應用重定向 URI", "LabelMobileRedirectURIsDescription": "這是移動應用程序的有效重定向 URI 白名單. 預設值為 audiobookshelf://oauth,您可以刪除它或加入其他 URI 以進行第三方應用集成. 使用星號 (*) 作為唯一條目允許任何 URI.", @@ -466,6 +464,8 @@ "LabelSettingsHideSingleBookSeriesHelp": "只有一本書的系列將從系列頁面和主頁書架中隱藏.", "LabelSettingsHomePageBookshelfView": "首頁使用書架視圖", "LabelSettingsLibraryBookshelfView": "媒體庫使用書架視圖", + "LabelSettingsOnlyShowLaterBooksInContinueSeries": "Skip earlier books in Continue Series", + "LabelSettingsOnlyShowLaterBooksInContinueSeriesHelp": "The Continue Series home page shelf shows the first book not started in series that have at least one book finished and no books in progress. Enabling this setting will continue series from the furthest completed book instead of the first book not started.", "LabelSettingsParseSubtitles": "解析副標題", "LabelSettingsParseSubtitlesHelp": "從有聲書資料夾中提取副標題.
副標題必須用 \" - \" 分隔.
例: \"書名 - 這裡是副標題\" 則顯示副標題 \"這裡是副標題\"", "LabelSettingsPreferMatchedMetadata": "首選匹配的元數據", @@ -776,4 +776,4 @@ "ToastSocketFailedToConnect": "網路連接失敗", "ToastUserDeleteFailed": "刪除使用者失敗", "ToastUserDeleteSuccess": "使用者已刪除" -} +} \ No newline at end of file diff --git a/server/models/Book.js b/server/models/Book.js index 6b179c3692..e2b56fbe3b 100644 --- a/server/models/Book.js +++ b/server/models/Book.js @@ -7,7 +7,7 @@ const Logger = require('../Logger') * @property {string} ebookFormat * @property {number} addedAt * @property {number} updatedAt - * @property {{filename:string, ext:string, path:string, relPath:string, size:number, mtimeMs:number, ctimeMs:number, birthtimeMs:number}} metadata + * @property {{filename:string, ext:string, path:string, relPath:strFing, size:number, mtimeMs:number, ctimeMs:number, birthtimeMs:number}} metadata */ /** diff --git a/server/objects/files/AudioFile.js b/server/objects/files/AudioFile.js index 8a3c2a743d..c0c425ba32 100644 --- a/server/objects/files/AudioFile.js +++ b/server/objects/files/AudioFile.js @@ -32,7 +32,6 @@ class AudioFile { this.metaTags = null this.manuallyVerified = false - this.invalid = false this.exclude = false this.error = null @@ -53,7 +52,6 @@ class AudioFile { trackNumFromFilename: this.trackNumFromFilename, discNumFromFilename: this.discNumFromFilename, manuallyVerified: !!this.manuallyVerified, - invalid: !!this.invalid, exclude: !!this.exclude, error: this.error || null, format: this.format, @@ -78,7 +76,6 @@ class AudioFile { this.addedAt = data.addedAt this.updatedAt = data.updatedAt this.manuallyVerified = !!data.manuallyVerified - this.invalid = !!data.invalid this.exclude = !!data.exclude this.error = data.error || null @@ -112,10 +109,6 @@ class AudioFile { } } - get isValidTrack() { - return !this.invalid && !this.exclude - } - // New scanner creates AudioFile from AudioFileScanner setDataFromProbe(libraryFile, probeData) { this.ino = libraryFile.ino || null diff --git a/server/objects/mediaTypes/Book.js b/server/objects/mediaTypes/Book.js index d53a53a727..8fdff98892 100644 --- a/server/objects/mediaTypes/Book.js +++ b/server/objects/mediaTypes/Book.js @@ -17,7 +17,6 @@ class Book { this.audioFiles = [] this.chapters = [] - this.missingParts = [] this.ebookFile = null this.lastCoverSearch = null @@ -36,7 +35,6 @@ class Book { this.tags = [...book.tags] this.audioFiles = book.audioFiles.map(f => new AudioFile(f)) this.chapters = book.chapters.map(c => ({ ...c })) - this.missingParts = book.missingParts ? [...book.missingParts] : [] this.ebookFile = book.ebookFile ? new EBookFile(book.ebookFile) : null this.lastCoverSearch = book.lastCoverSearch || null this.lastCoverSearchQuery = book.lastCoverSearchQuery || null @@ -51,7 +49,6 @@ class Book { tags: [...this.tags], audioFiles: this.audioFiles.map(f => f.toJSON()), chapters: this.chapters.map(c => ({ ...c })), - missingParts: [...this.missingParts], ebookFile: this.ebookFile ? this.ebookFile.toJSON() : null } } @@ -65,8 +62,6 @@ class Book { numTracks: this.tracks.length, 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?.ebookFormat @@ -85,7 +80,6 @@ class Book { duration: this.duration, size: this.size, tracks: this.tracks.map(t => t.toJSON()), - missingParts: [...this.missingParts], ebookFile: this.ebookFile?.toJSON() || null } } @@ -109,11 +103,8 @@ class Book { get hasMediaEntities() { return !!this.tracks.length || this.ebookFile } - get invalidAudioFiles() { - return this.audioFiles.filter(af => af.invalid) - } get includedAudioFiles() { - return this.audioFiles.filter(af => !af.exclude && !af.invalid) + return this.audioFiles.filter(af => !af.exclude) } get tracks() { let startOffset = 0 @@ -238,7 +229,6 @@ class Book { this.audioFiles = orderedFileData.map((fileData) => { const audioFile = this.audioFiles.find(af => af.ino === fileData.ino) audioFile.manuallyVerified = true - audioFile.invalid = false audioFile.error = null if (fileData.exclude !== undefined) { audioFile.exclude = !!fileData.exclude @@ -257,7 +247,6 @@ class Book { rebuildTracks() { Logger.debug(`[Book] Tracks being rebuilt...!`) this.audioFiles.sort((a, b) => a.index - b.index) - this.missingParts = [] } // Only checks container format