updated old legacy store names
This commit is contained in:
+12
-14
@@ -816,7 +816,7 @@ def _prefetch_notes_async(
|
||||
set_notes_prefetch_pending,
|
||||
store_cached_notes,
|
||||
)
|
||||
from Store import Store
|
||||
from PluginCore.backend_registry import BackendRegistry
|
||||
|
||||
cached = load_cached_notes(store, file_hash, config=cfg)
|
||||
if cached is not None:
|
||||
@@ -824,7 +824,7 @@ def _prefetch_notes_async(
|
||||
|
||||
set_notes_prefetch_pending(store, file_hash, True)
|
||||
|
||||
registry = Store(cfg, suppress_debug=True)
|
||||
registry = BackendRegistry(cfg, suppress_debug=True)
|
||||
if not registry.is_available(str(store)):
|
||||
return
|
||||
backend = registry[str(store)]
|
||||
@@ -1674,14 +1674,14 @@ def _queue_items(
|
||||
except Exception:
|
||||
hydrus_url = None
|
||||
|
||||
# Initialize Store registry for path resolution
|
||||
# Initialize backend registry for path resolution
|
||||
file_storage = None
|
||||
try:
|
||||
from Store import Store
|
||||
from PluginCore.backend_registry import BackendRegistry
|
||||
|
||||
file_storage = Store(config or {})
|
||||
file_storage = BackendRegistry(config or {})
|
||||
except Exception as e:
|
||||
debug(f"Warning: Could not initialize Store registry: {e}", file=sys.stderr)
|
||||
debug(f"Warning: Could not initialize backend registry: {e}", file=sys.stderr)
|
||||
|
||||
_schedule_notes_prefetch(items, config)
|
||||
|
||||
@@ -1831,12 +1831,10 @@ def _queue_items(
|
||||
continue
|
||||
new_targets.add(norm_key)
|
||||
|
||||
# Use memory:// M3U hack to pass title to MPV.
|
||||
# Avoid this for probable ytdl URLs because it can prevent the hook from triggering.
|
||||
# Use memory:// M3U to preserve titles in MPV's playlist UI.
|
||||
# Avoid this only for probable ytdl URLs because it can prevent the hook from triggering.
|
||||
safe_title = title.replace("\n", " ").replace("\r", "") if title else None
|
||||
if title and hydrus_target:
|
||||
target_to_send = target
|
||||
elif title and not _is_probable_ytdl_url(target):
|
||||
if title and not _is_probable_ytdl_url(target):
|
||||
# Sanitize title for M3U (remove newlines)
|
||||
# Carry the store name for hash URLs so MPV.lyric can resolve the backend.
|
||||
# This is especially important for local file-server URLs like /get_files/file?hash=...
|
||||
@@ -2587,12 +2585,12 @@ def _run(result: Any, args: Sequence[str], config: Dict[str, Any]) -> int:
|
||||
|
||||
if file_storage is None:
|
||||
try:
|
||||
from Store import Store
|
||||
from PluginCore.backend_registry import BackendRegistry
|
||||
|
||||
file_storage = Store(config)
|
||||
file_storage = BackendRegistry(config)
|
||||
except Exception as e:
|
||||
debug(
|
||||
f"Warning: Could not initialize Store registry: {e}",
|
||||
f"Warning: Could not initialize backend registry: {e}",
|
||||
file=sys.stderr
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user