alldebrid plugin optimization and mpv playlist fix

This commit is contained in:
2026-04-26 13:48:18 -07:00
parent 67c272db4b
commit c724cb36b1
7 changed files with 147 additions and 31 deletions
+13 -1
View File
@@ -804,7 +804,19 @@ def resolve_target_dir(
target = parsed.get("path")
if target:
try:
p = Path(str(target)).expanduser().resolve()
from SYS.config import resolve_path_alias
from SYS.utils import expand_path
raw_target = str(target or "").strip()
aliased = resolve_path_alias(config, raw_target)
if raw_target.startswith("$") and aliased is None:
log(
f"Unknown path alias {raw_target}. Set it with .config path_aliases.<name> <path>",
file=sys.stderr,
)
return None
p = aliased if aliased is not None else expand_path(raw_target)
if handle_creations:
p.mkdir(parents=True, exist_ok=True)
return p