Remove restrictive URL checkers
Some checks are pending
Create and publish a Docker image / build-and-push-image (push) Waiting to run

This commit is contained in:
Parker M. 2025-01-20 21:03:20 -06:00
parent 432dee5cc4
commit 6034a95e48
Signed by: parker
GPG Key ID: 505ED36FC12B5D5E
2 changed files with 3 additions and 28 deletions

View File

@ -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"],

View File

@ -2,7 +2,6 @@ colorlog==6.8.2
requests==2.32.0
wonderwords==2.2.0
PyYAML==6.0.2
validators==0.34.0
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
discord.py==2.4.0