From 7ac8f2fcb5100ff7e34ae4f46be6a57f7d3164b5 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Mon, 29 Nov 2021 14:04:43 -0500 Subject: [PATCH] fix tautulli list_minimum --- modules/radarr.py | 8 ++++++++ modules/sonarr.py | 10 +++++++++- modules/tautulli.py | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/modules/radarr.py b/modules/radarr.py index 84c71ced..0d072c19 100644 --- a/modules/radarr.py +++ b/modules/radarr.py @@ -36,7 +36,15 @@ class Radarr: logger.info("") util.separator("Adding to Radarr", space=False, border=False) logger.debug("") + _ids = [] + _paths = [] for tmdb_id in tmdb_ids: + if isinstance(tmdb_id, tuple): + _paths.append(tmdb_id) + else: + _ids.append(tmdb_id) + logger.debug(f"Radarr Adds: {_ids if _ids else ''}") + for tmdb_id in _paths: logger.debug(tmdb_id) folder = options["folder"] if "folder" in options else self.root_folder_path monitor = options["monitor"] if "monitor" in options else self.monitor diff --git a/modules/sonarr.py b/modules/sonarr.py index f68ad76d..c0753e26 100644 --- a/modules/sonarr.py +++ b/modules/sonarr.py @@ -2,7 +2,7 @@ import logging from modules import util from modules.util import Failed from arrapi import SonarrAPI -from arrapi.exceptions import ArrException, Invalid, NotFound +from arrapi.exceptions import ArrException, Invalid logger = logging.getLogger("Plex Meta Manager") @@ -58,7 +58,15 @@ class Sonarr: logger.info("") util.separator("Adding to Sonarr", space=False, border=False) logger.debug("") + _ids = [] + _paths = [] for tvdb_id in tvdb_ids: + if isinstance(tvdb_id, tuple): + _paths.append(tvdb_id) + else: + _ids.append(tvdb_id) + logger.debug(f"Radarr Adds: {_ids if _ids else ''}") + for tvdb_id in _paths: logger.debug(tvdb_id) folder = options["folder"] if "folder" in options else self.root_folder_path monitor = monitor_translation[options["monitor"] if "monitor" in options else self.monitor] diff --git a/modules/tautulli.py b/modules/tautulli.py index a2c7cdf2..0079304c 100644 --- a/modules/tautulli.py +++ b/modules/tautulli.py @@ -43,7 +43,7 @@ class Tautulli: rating_keys = [] for item in items: if item["section_id"] == section_id and len(rating_keys) < int(params['list_size']): - if item[stat_type] < params['list_minimum']: + if int(item[stat_type]) < params['list_minimum']: continue try: plex_item = library.fetchItem(int(item["rating_key"]))