Update app.py

This commit is contained in:
2025-12-31 11:36:40 +01:00
committed by GitHub
parent 3977da4291
commit 6e9c2dc08b

View File

@@ -157,15 +157,14 @@ def get_device():
if devices is None: if devices is None:
raise RuntimeError("MyJDownloader API returned no device list") raise RuntimeError("MyJDownloader API returned no device list")
# sometimes devices appear with a short delay
if not devices: if not devices:
# Devices exist laut Server, aber noch nicht synchron
time.sleep(2) time.sleep(2)
jd.update_devices() jd.update_devices()
devices = getattr(jd, "devices", []) or [] devices = getattr(jd, "devices", []) or []
if not devices: if not devices:
raise RuntimeError("MyJDownloader connected but no devices visible yet") raise RuntimeError("No MyJDownloader devices available (is JDownloader online/logged in?)")
wanted = (MYJD_DEVICE or "").strip() wanted = (MYJD_DEVICE or "").strip()
if wanted: if wanted: