Added support for lidarr (UNTESTED!)

This commit is contained in:
Benjamin Harder
2023-10-20 08:53:36 +02:00
parent 45fc205c2a
commit c32340b081
6 changed files with 75 additions and 32 deletions

View File

@@ -99,6 +99,11 @@ SONARR_URL = get_config_value('SONARR_URL',
SONARR_KEY = None if SONARR_URL == None else \
get_config_value('SONARR_KEY', 'sonarr', True, str)
# Lidarr
LIDARR_URL = get_config_value('LIDARR_URL', 'lidarr', False, str)
LIDARR_KEY = None if LIDARR_URL == None else \
get_config_value('LIDARR_KEY', 'lidarr', True, str)
# qBittorrent
QBITTORRENT_URL = get_config_value('QBITTORRENT_URL', 'qbittorrent', False, str, '')
QBITTORRENT_USERNAME = get_config_value('QBITTORRENT_USERNAME', 'qbittorrent', False, str, '')
@@ -106,13 +111,14 @@ QBITTORRENT_PASSWORD = get_config_value('QBITTORRENT_PASSWORD',
########################################################################################################################
########### Validate settings
if not (RADARR_URL or SONARR_URL):
print(f'[ ERROR ]: No Radarr/Sonarr URLs specified (nothing to monitor)')
if not (RADARR_URL or SONARR_URL or LIDARR_URL):
print(f'[ ERROR ]: No Radarr/Sonarr/Lidarr URLs specified (nothing to monitor)')
sys.exit(0)
########### Enrich setting variables
if RADARR_URL: RADARR_URL += '/api/v3'
if SONARR_URL: SONARR_URL += '/api/v3'
if LIDARR_URL: LIDARR_URL += '/api/v1'
if QBITTORRENT_URL: QBITTORRENT_URL += '/api/v2'
########### Add Variables to Dictionary