🚑 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
@@ -342,6 +342,36 @@ def test_scan_skips_mkv_renamed_as_iso() -> None:
|
||||
assert titles == ["ISO Movie"]
|
||||
|
||||
|
||||
@respx.mock
|
||||
def test_convert_tolerates_stray_space_in_stored_path() -> None:
|
||||
"""Reprise du cas reel « Coco »: le chemin stocke (issu de Radarr) porte
|
||||
une espace parasite en tete — MakeMKV cherchait un fichier inexistant.
|
||||
La traduction nettoie l'espace, la conversion part sur le vrai fichier."""
|
||||
reset_state()
|
||||
create_film_folder()
|
||||
# Ligne en base avec l'espace, ISO presente au chemin propre.
|
||||
with SessionLocal() as db:
|
||||
movie = IsoMovie(
|
||||
radarr_movie_id=10,
|
||||
radarr_movie_file_id=20,
|
||||
title="ISO Movie",
|
||||
year=2025,
|
||||
path=f" {settings.radarr_films_dir / FILM_FOLDER / ISO_NAME}",
|
||||
status="detected",
|
||||
last_seen_at=datetime(2026, 1, 1),
|
||||
)
|
||||
db.add(movie)
|
||||
db.commit()
|
||||
movie_id = movie.id
|
||||
with TestClient(app) as client:
|
||||
converted = client.post(f"/api/movies/{movie_id}/convert")
|
||||
assert converted.status_code == 200
|
||||
assert converted.json()["status"] == "queued"
|
||||
# La conversion simulee aboutit jusqu'a la validation.
|
||||
movie = wait_for_status(client, "validating")
|
||||
assert movie["status"] == "validating"
|
||||
|
||||
|
||||
@respx.mock
|
||||
def test_convert_refuses_iso_invisible_in_container() -> None:
|
||||
"""L'ISO rapportee par Radarr mais introuvable dans le conteneur (montage
|
||||
|
||||
Reference in new issue
Block a user