fix: Lock an register_extra_routes uebergeben fuer atomare Progress-Writes

Verhindert Race Condition zwischen api_download und api_download_progress
beim gleichzeitigen Schreiben in .download_progress.json
This commit is contained in:
Homelab Cursor 2026-03-21 19:02:40 +01:00
parent 27ca687923
commit b45b377ffe

View file

@ -786,7 +786,10 @@ def api_download():
# Extra-Routes (Downloads, Status, Health) - lokal in /opt/savetv_extra_routes.py # Extra-Routes (Downloads, Status, Health) - lokal in /opt/savetv_extra_routes.py
try: try:
from savetv_extra_routes import register_extra_routes from savetv_extra_routes import register_extra_routes
register_extra_routes(app) register_extra_routes(app,
progress_lock=_PROGRESS_LOCK,
load_progress_raw=_load_progress_raw,
save_progress_raw=_save_progress_raw)
except ImportError: except ImportError:
pass pass