Remove restrictive URL checkers
Some checks are pending
Create and publish a Docker image / build-and-push-image (push) Waiting to run
Some checks are pending
Create and publish a Docker image / build-and-push-image (push) Waiting to run
This commit is contained in:
parent
432dee5cc4
commit
6034a95e48
@ -1,5 +1,4 @@
|
|||||||
import jsonschema
|
import jsonschema
|
||||||
import validators
|
|
||||||
import yaml
|
import yaml
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
@ -192,15 +191,7 @@ def validate_config(contents) -> None:
|
|||||||
BOT_TOKEN = config["bot_info"]["bot_token"]
|
BOT_TOKEN = config["bot_info"]["bot_token"]
|
||||||
|
|
||||||
if "radarr" in config:
|
if "radarr" in config:
|
||||||
if not validators.url(config["radarr"]["host_url"]):
|
RADARR_HOST_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_HEADERS = {
|
RADARR_HEADERS = {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"X-Api-Key": config["radarr"]["api_key"],
|
"X-Api-Key": config["radarr"]["api_key"],
|
||||||
@ -213,15 +204,7 @@ def validate_config(contents) -> None:
|
|||||||
RADARR_ENABLED = True
|
RADARR_ENABLED = True
|
||||||
|
|
||||||
if "sonarr" in config:
|
if "sonarr" in config:
|
||||||
if not validators.url(config["sonarr"]["host_url"]):
|
SONARR_HOST_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_HEADERS = {
|
SONARR_HEADERS = {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"X-Api-Key": config["sonarr"]["api_key"],
|
"X-Api-Key": config["sonarr"]["api_key"],
|
||||||
@ -234,14 +217,7 @@ def validate_config(contents) -> None:
|
|||||||
SONARR_ENABLED = True
|
SONARR_ENABLED = True
|
||||||
|
|
||||||
if "jellyfin" in config:
|
if "jellyfin" in config:
|
||||||
if not validators.url(config["jellyfin"]["url"]):
|
JELLYFIN_URL = config["jellyfin"]["url"]
|
||||||
LOG.critical(
|
|
||||||
"Error in config.yaml: Invalid URL for Jellyfin - account"
|
|
||||||
" creation disabled"
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
JELLYFIN_URL = config["jellyfin"]["url"]
|
|
||||||
|
|
||||||
JELLYFIN_HEADERS = {
|
JELLYFIN_HEADERS = {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"X-Emby-Token": config["jellyfin"]["api_key"],
|
"X-Emby-Token": config["jellyfin"]["api_key"],
|
||||||
|
@ -2,7 +2,6 @@ colorlog==6.8.2
|
|||||||
requests==2.32.0
|
requests==2.32.0
|
||||||
wonderwords==2.2.0
|
wonderwords==2.2.0
|
||||||
PyYAML==6.0.2
|
PyYAML==6.0.2
|
||||||
validators==0.34.0
|
|
||||||
jsonschema==4.23.0
|
jsonschema==4.23.0
|
||||||
jsonschema-specifications==2024.10.1
|
jsonschema-specifications==2024.10.1
|
||||||
discord.py==2.4.0
|
discord.py==2.4.0
|
Loading…
x
Reference in New Issue
Block a user