style: apply ruff format across backend + scripts (line-length 100)
Mechanical, whole-tree `ruff format` pass — no behaviour change. Recorded in .git-blame-ignore-revs (next commit) so git blame skips it.
This commit is contained in:
@@ -7,6 +7,7 @@ is admin-configured (sysconfig ``plex_path_map``) as newline/comma-separated ``p
|
||||
pairs; the longest matching Plex prefix wins. An empty map means the paths are identical on both
|
||||
sides (Plex and Siftlode see the same filesystem).
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from sqlalchemy.orm import Session
|
||||
@@ -33,7 +34,7 @@ def map_path(db: Session, plex_path: str) -> str:
|
||||
"""Translate a Plex-side absolute path to the local mount path (no mapping = unchanged)."""
|
||||
for plex_prefix, local_prefix in parse_map(sysconfig.get_str(db, "plex_path_map")):
|
||||
if plex_path == plex_prefix or plex_path.startswith(plex_prefix.rstrip("/") + "/"):
|
||||
rest = plex_path[len(plex_prefix):].lstrip("/")
|
||||
rest = plex_path[len(plex_prefix) :].lstrip("/")
|
||||
return str(Path(local_prefix) / rest) if rest else local_prefix
|
||||
return plex_path
|
||||
|
||||
|
||||
Reference in New Issue
Block a user