fix tautulli list_minimum

pull/465/head
meisnate12 3 years ago
parent 6fd699b58a
commit 7ac8f2fcb5

@ -36,7 +36,15 @@ class Radarr:
logger.info("") logger.info("")
util.separator("Adding to Radarr", space=False, border=False) util.separator("Adding to Radarr", space=False, border=False)
logger.debug("") logger.debug("")
_ids = []
_paths = []
for tmdb_id in tmdb_ids: 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) logger.debug(tmdb_id)
folder = options["folder"] if "folder" in options else self.root_folder_path folder = options["folder"] if "folder" in options else self.root_folder_path
monitor = options["monitor"] if "monitor" in options else self.monitor monitor = options["monitor"] if "monitor" in options else self.monitor

@ -2,7 +2,7 @@ import logging
from modules import util from modules import util
from modules.util import Failed from modules.util import Failed
from arrapi import SonarrAPI from arrapi import SonarrAPI
from arrapi.exceptions import ArrException, Invalid, NotFound from arrapi.exceptions import ArrException, Invalid
logger = logging.getLogger("Plex Meta Manager") logger = logging.getLogger("Plex Meta Manager")
@ -58,7 +58,15 @@ class Sonarr:
logger.info("") logger.info("")
util.separator("Adding to Sonarr", space=False, border=False) util.separator("Adding to Sonarr", space=False, border=False)
logger.debug("") logger.debug("")
_ids = []
_paths = []
for tvdb_id in tvdb_ids: 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) logger.debug(tvdb_id)
folder = options["folder"] if "folder" in options else self.root_folder_path folder = options["folder"] if "folder" in options else self.root_folder_path
monitor = monitor_translation[options["monitor"] if "monitor" in options else self.monitor] monitor = monitor_translation[options["monitor"] if "monitor" in options else self.monitor]

@ -43,7 +43,7 @@ class Tautulli:
rating_keys = [] rating_keys = []
for item in items: for item in items:
if item["section_id"] == section_id and len(rating_keys) < int(params['list_size']): 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 continue
try: try:
plex_item = library.fetchItem(int(item["rating_key"])) plex_item = library.fetchItem(int(item["rating_key"]))

Loading…
Cancel
Save