fix: Simplify audiobookshelf availability check and improve error handling in prepare.js

This commit is contained in:
JB
2025-11-30 05:31:25 -08:00
parent 079c36702e
commit 540b191d5b
2 changed files with 4 additions and 5 deletions
+1 -4
View File
@@ -579,10 +579,7 @@ def audiobookshelf_manual_available() -> bool:
settings = stored_integration_config("audiobookshelf")
if not settings:
return False
if not coerce_bool(settings.get("enabled"), False):
return False
config = build_audiobookshelf_config(settings)
return config is not None
return coerce_bool(settings.get("enabled"), False)
def build_calibre_client(settings: Mapping[str, Any]) -> CalibreOPDSClient:
+3 -1
View File
@@ -1730,7 +1730,9 @@ const initPrepare = (root = document) => {
}
if (peopleStatsNode) {
if (!peopleEntries.length) {
if (errors.length) {
peopleStatsNode.textContent = errors.join(" · ");
} else if (!peopleEntries.length) {
peopleStatsNode.textContent = "No characters detected yet.";
} else if (!peopleRender.visible) {
peopleStatsNode.textContent = "Adjust the mention filter to see additional characters.";