diff --git a/docker-compose.yml b/docker-compose.yml index 6f788b0..426e38b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -102,8 +102,8 @@ services: volumes: - ${REALDEBRID_MOUNT_TORRENTS_PATH:-${BLACKHOLE_RD_MOUNT_TORRENTS_PATH:-/dev/null}}:${REALDEBRID_MOUNT_TORRENTS_PATH:-${BLACKHOLE_RD_MOUNT_TORRENTS_PATH:-/dev/null}} - ${TORBOX_MOUNT_TORRENTS_PATH:-/dev/null}:${TORBOX_MOUNT_TORRENTS_PATH:-/dev/null} - - ${SONARR_ROOT_FOLDER_4K}:${SONARR_ROOT_FOLDER} - - ${RADARR_ROOT_FOLDER_4K}:${RADARR_ROOT_FOLDER} + - ${SONARR_ROOT_FOLDER_4K}:${SONARR_ROOT_FOLDER_4K} + - ${RADARR_ROOT_FOLDER_4K}:${RADARR_ROOT_FOLDER_4K} profiles: [repair_4k, repair_all, all] repair_anime: @@ -117,8 +117,8 @@ services: volumes: - ${REALDEBRID_MOUNT_TORRENTS_PATH:-${BLACKHOLE_RD_MOUNT_TORRENTS_PATH:-/dev/null}}:${REALDEBRID_MOUNT_TORRENTS_PATH:-${BLACKHOLE_RD_MOUNT_TORRENTS_PATH:-/dev/null}} - ${TORBOX_MOUNT_TORRENTS_PATH:-/dev/null}:${TORBOX_MOUNT_TORRENTS_PATH:-/dev/null} - - ${SONARR_ROOT_FOLDER_ANIME}:${SONARR_ROOT_FOLDER} - - ${RADARR_ROOT_FOLDER_ANIME}:${RADARR_ROOT_FOLDER} + - ${SONARR_ROOT_FOLDER_ANIME}:${SONARR_ROOT_FOLDER_ANIME} + - ${RADARR_ROOT_FOLDER_ANIME}:${RADARR_ROOT_FOLDER_ANIME} profiles: [repair_anime, repair_all, all] repair_mux: @@ -132,8 +132,8 @@ services: volumes: - ${REALDEBRID_MOUNT_TORRENTS_PATH:-${BLACKHOLE_RD_MOUNT_TORRENTS_PATH:-/dev/null}}:${REALDEBRID_MOUNT_TORRENTS_PATH:-${BLACKHOLE_RD_MOUNT_TORRENTS_PATH:-/dev/null}} - ${TORBOX_MOUNT_TORRENTS_PATH:-/dev/null}:${TORBOX_MOUNT_TORRENTS_PATH:-/dev/null} - - ${SONARR_ROOT_FOLDER_MUX}:${SONARR_ROOT_FOLDER} - - ${RADARR_ROOT_FOLDER_MUX}:${RADARR_ROOT_FOLDER} + - ${SONARR_ROOT_FOLDER_MUX}:${SONARR_ROOT_FOLDER_MUX} + - ${RADARR_ROOT_FOLDER_MUX}:${RADARR_ROOT_FOLDER_MUX} profiles: [repair_mux, repair_all, all] watchlist: diff --git a/repair.py b/repair.py index 75d4f0a..51e4b3c 100644 --- a/repair.py +++ b/repair.py @@ -69,11 +69,12 @@ def main(): for childFile in childFiles: fullPath = childFile.path - destinationPath = os.readlink(fullPath) realPath = os.path.realpath(fullPath) realPaths.append(realPath) if os.path.islink(fullPath): + destinationPath = os.readlink(fullPath) + if ((realdebrid['enabled'] and destinationPath.startswith(realdebrid['mountTorrentsPath']) and not os.path.exists(destinationPath)) or (torbox['enabled'] and destinationPath.startswith(torbox['mountTorrentsPath']) and not os.path.exists(realPath))): brokenSymlinks.append(realPath) diff --git a/shared/arr.py b/shared/arr.py index b17b9cf..ad597e3 100644 --- a/shared/arr.py +++ b/shared/arr.py @@ -4,7 +4,7 @@ from shared.shared import sonarr, radarr, checkRequiredEnvs def validateSonarrHost(): - url = f"{sonarr['host']}" + url = f"{sonarr['host']}/login" try: response = requests.get(url) return response.status_code == 200 @@ -23,7 +23,7 @@ def validateSonarrApiKey(): return True def validateRadarrHost(): - url = f"{radarr['host']}" + url = f"{radarr['host']}/login" try: response = requests.get(url) return response.status_code == 200 diff --git a/shared/debrid.py b/shared/debrid.py index 573c571..f201834 100644 --- a/shared/debrid.py +++ b/shared/debrid.py @@ -2,7 +2,6 @@ import os import re import hashlib -import bencode3 import requests from abc import ABC, abstractmethod from urllib.parse import urljoin @@ -493,6 +492,7 @@ class Torrent(TorrentBase): def getHash(self): if not self._hash: + import bencode3 self._hash = hashlib.sha1(bencode3.bencode(bencode3.bdecode(self.fileData)['info'])).hexdigest() return self._hash