mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 13:40:27 +02:00
fix: Simplify audiobookshelf availability check and improve error handling in prepare.js
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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.";
|
||||
|
||||
Reference in New Issue
Block a user