diff --git a/modules/builder.py b/modules/builder.py index 38af19a1..aa37018f 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -726,9 +726,6 @@ class CollectionBuilder: elif method_name == "file_background": if os.path.exists(method_data): self.backgrounds[method_name] = os.path.abspath(method_data) else: raise Failed(f"Collection Error: Background Path Does Not Exist: {os.path.abspath(method_data)}") - elif method_name == "sync_mode": - if str(method_data).lower() in ["append", "sync"]: self.details[method_name] = method_data.lower() - else: raise Failed("Collection Error: sync_mode attribute must be either 'append' or 'sync'") elif method_name == "label": if "label" in self.data and "label.sync" in self.data: raise Failed(f"Collection Error: Cannot use label and label.sync together") diff --git a/modules/tautulli.py b/modules/tautulli.py index cd2e17c5..b173f132 100644 --- a/modules/tautulli.py +++ b/modules/tautulli.py @@ -2,7 +2,6 @@ import logging, requests from modules import util from modules.util import Failed from plexapi.exceptions import BadRequest, NotFound -from plexapi.video import Movie, Show from retrying import retry logger = logging.getLogger("Plex Meta Manager") @@ -12,7 +11,7 @@ builders = ["tautulli_popular", "tautulli_watched"] class TautulliAPI: def __init__(self, params): try: - response = requests.get(f"{params['url']}/api/v2?apikey={params['apikey']}&cmd=get_library_names").json() + response = self._request(f"{params['url']}/api/v2?apikey={params['apikey']}&cmd=get_library_names") except Exception: util.print_stacktrace() raise Failed("Tautulli Error: Invalid url") @@ -65,5 +64,5 @@ class TautulliAPI: @retry(stop_max_attempt_number=6, wait_fixed=10000) def _request(self, url): - logger.debug(f"Tautulli URL: {url.replace(self.apikey, '################################')}") + logger.debug(f"Tautulli URL: {url.replace(self.apikey, '###############')}") return requests.get(url).json()