🚑 Espace parasite en tete de chemin Radarr: nettoyee a l'ingestion et a la traduction - MakeMKV cherchait un fichier inexistant (cas Coco)
This commit is contained in:
1 parent
1df4daaae5
commit
ddf39b63ef
5 files changed
+72
-5
No files matched your search
+9
-2
@@ -67,12 +67,19 @@ class RadarrClient:
|
||||
|
||||
|
||||
def movie_file_path(movie: dict) -> str | None:
|
||||
"""Chemin du fichier courant rapporte par Radarr.
|
||||
|
||||
Les espaces parasites (tete surtout — une racine Radarr configuree avec
|
||||
une espace de trop) sont ecartees: elles casseraient silencieusement la
|
||||
traduction de chemin (relative_to echoue) et MakeMKV chercherait un
|
||||
fichier « inexistant ».
|
||||
"""
|
||||
movie_file = movie.get("movieFile") or {}
|
||||
path = movie_file.get("path")
|
||||
if path:
|
||||
return str(path)
|
||||
return str(path).strip()
|
||||
relative_path = movie_file.get("relativePath")
|
||||
movie_path = movie.get("path")
|
||||
if relative_path and movie_path:
|
||||
return str(PurePath(str(movie_path)) / str(relative_path))
|
||||
return str(PurePath(str(movie_path).strip()) / str(relative_path).strip())
|
||||
return None
|
||||
Reference in new issue
Block a user