✨ Champ port optionnel (Radarr + qBittorrent) et normalisation des adresses locales
This commit is contained in:
1 parent
f0b5f2b21e
commit
76dbd7e425
6 files changed
+127
-35
No files matched your search
@@ -6,11 +6,12 @@ The project now externalises its configuration into ./config/conf.json.
|
||||
This module is kept temporarily because some imports may still reference it.
|
||||
"""
|
||||
|
||||
from app.conf_store import read_config
|
||||
from app.conf_store import build_base_url, read_config
|
||||
|
||||
|
||||
def radarr_credentials(_: object | None = None) -> tuple[str, str]:
|
||||
cfg = read_config()
|
||||
if not cfg.radarr.url or not cfg.radarr.api_key:
|
||||
url = build_base_url(cfg.radarr.url, cfg.radarr.port)
|
||||
if not url or not cfg.radarr.api_key:
|
||||
raise ValueError("La connexion Radarr n'est pas configurée")
|
||||
return cfg.radarr.url.rstrip("/"), cfg.radarr.api_key
|
||||
return url, cfg.radarr.api_key
|
||||
Reference in new issue
Block a user