diff --git a/homelab-ai-bot/savetv_extra_routes.py b/homelab-ai-bot/savetv_extra_routes.py index f231d50b..8397b4a1 100644 --- a/homelab-ai-bot/savetv_extra_routes.py +++ b/homelab-ai-bot/savetv_extra_routes.py @@ -18,6 +18,10 @@ JELLYFIN_URL = _os.environ.get("JELLYFIN_URL", "http://100.77.105.3:8096") JELLYFIN_USER = _os.environ.get("JELLYFIN_USER", "admin") JELLYFIN_PASS = _os.environ.get("JELLYFIN_PASS", "astral66") +# Direkter Download ohne Cloudflare (Hetzner :9443 → nginx → CT 116) +SAVETV_DIRECT_BASE = _os.environ.get("SAVETV_DIRECT_BASE", "http://138.201.84.95:9443") +SAVETV_TUNNEL_BASE = _os.environ.get("SAVETV_TUNNEL_BASE", "https://savetv.orbitalo.net") + def _normalize_film_title(s: str) -> str: """Gleiche Logik wie normTitle() in savetv_web.js fuer Abgleich.""" @@ -177,6 +181,8 @@ def register_extra_routes(app, progress_lock=None, load_progress_raw=None, save_ clean = name.rsplit(".", 1)[0] esc = _html.escape(name, quote=True) date_str = _dt.fromtimestamp(mtime).strftime("%d.%m.%Y") + href_direct = SAVETV_DIRECT_BASE.rstrip("/") + "/files/" + _urlquote(name) + href_tunnel = SAVETV_TUNNEL_BASE.rstrip("/") + "/files/" + _urlquote(name) rows += ( '
' + _html.escape(SAVETV_DIRECT_BASE, quote=True) + ' — '
+ 'Basic-Auth mit Benutzer mike, Passwort wie in homelab.conf. '
+ 'Fallback: Link CF pro Zeile (Cloudflare-Tunnel, '
+ '' + _html.escape(SAVETV_TUNNEL_BASE, quote=True) + ').'
+ '