aboutsummaryrefslogtreecommitdiff
path: root/code/utils/config.py
diff options
context:
space:
mode:
authorParker <contact@pkrm.dev>2025-01-20 21:03:20 -0600
committerParker <contact@pkrm.dev>2025-01-20 21:03:20 -0600
commit6034a95e48bb5c785f0957c2061322e7f5fb0e03 (patch)
treec0e8b83cac5ee5ce542cbc02bf73ba2c236b0fc6 /code/utils/config.py
parent432dee5cc499d0cd58bfc5061161c59f3a883647 (diff)
Remove restrictive URL checkers
Diffstat (limited to 'code/utils/config.py')
-rw-r--r--code/utils/config.py30
1 files changed, 3 insertions, 27 deletions
diff --git a/code/utils/config.py b/code/utils/config.py
index 061b424..c6d107e 100644
--- a/code/utils/config.py
+++ b/code/utils/config.py
@@ -1,5 +1,4 @@
import jsonschema
-import validators
import yaml
import sys
import os
@@ -192,15 +191,7 @@ def validate_config(contents) -> None:
BOT_TOKEN = config["bot_info"]["bot_token"]
if "radarr" in config:
- if not validators.url(config["radarr"]["host_url"]):
- sys.exit(
- LOG.critical(
- "Error in config.yaml: Invalid URL for Radarr host"
- )
- )
- else:
- RADARR_HOST_URL = config["radarr"]["host_url"]
-
+ RADARR_HOST_URL = config["radarr"]["host_url"]
RADARR_HEADERS = {
"Content-Type": "application/json",
"X-Api-Key": config["radarr"]["api_key"],
@@ -213,15 +204,7 @@ def validate_config(contents) -> None:
RADARR_ENABLED = True
if "sonarr" in config:
- if not validators.url(config["sonarr"]["host_url"]):
- sys.exit(
- LOG.critical(
- "Error in config.yaml: Invalid URL for Sonarr host"
- )
- )
- else:
- SONARR_HOST_URL = config["sonarr"]["host_url"]
-
+ SONARR_HOST_URL = config["sonarr"]["host_url"]
SONARR_HEADERS = {
"Content-Type": "application/json",
"X-Api-Key": config["sonarr"]["api_key"],
@@ -234,14 +217,7 @@ def validate_config(contents) -> None:
SONARR_ENABLED = True
if "jellyfin" in config:
- if not validators.url(config["jellyfin"]["url"]):
- LOG.critical(
- "Error in config.yaml: Invalid URL for Jellyfin - account"
- " creation disabled"
- )
- else:
- JELLYFIN_URL = config["jellyfin"]["url"]
-
+ JELLYFIN_URL = config["jellyfin"]["url"]
JELLYFIN_HEADERS = {
"Content-Type": "application/json",
"X-Emby-Token": config["jellyfin"]["api_key"],