From a36058cab9eaa76c7a2d783bf33ef033124f5a58 Mon Sep 17 00:00:00 2001 From: Hermes Date: Sun, 9 Aug 2026 23:35:12 +0200 Subject: [PATCH] fix: pass MOVIES_DIR env to build_catalog.sh --- app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 468d8e1..eece2b3 100644 --- a/app.py +++ b/app.py @@ -101,9 +101,10 @@ def rebuild_catalog(): script = MOVIES_DIR.parent / "build_catalog.sh" if not script.exists(): raise HTTPException(500, "build_catalog.sh not found at %s" % script) + env = dict(os.environ, MOVIES_DIR=str(MOVIES_DIR)) try: subprocess.run(["bash", str(script)], check=True, - capture_output=True, text=True, timeout=120) + capture_output=True, text=True, timeout=120, env=env) except subprocess.CalledProcessError as e: raise HTTPException(500, "build failed: " + (e.stderr or e.stdout or str(e))) cat = load_catalog()