From 6e9c2dc08b535a0bd7a51a3761d48183c16ecb14 Mon Sep 17 00:00:00 2001 From: DasPoschi Date: Wed, 31 Dec 2025 11:36:40 +0100 Subject: [PATCH] Update app.py --- jd-webgui/app.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/jd-webgui/app.py b/jd-webgui/app.py index c54c476..0607722 100644 --- a/jd-webgui/app.py +++ b/jd-webgui/app.py @@ -157,15 +157,14 @@ def get_device(): if devices is None: raise RuntimeError("MyJDownloader API returned no device list") -if not devices: - # Devices exist laut Server, aber noch nicht synchron - time.sleep(2) - jd.update_devices() - devices = getattr(jd, "devices", []) or [] - -if not devices: - raise RuntimeError("MyJDownloader connected but no devices visible yet") + # sometimes devices appear with a short delay + if not devices: + time.sleep(2) + jd.update_devices() + devices = getattr(jd, "devices", []) or [] + if not devices: + raise RuntimeError("No MyJDownloader devices available (is JDownloader online/logged in?)") wanted = (MYJD_DEVICE or "").strip() if wanted: