From dd7544ad4f9d31aaaf6a6e549991e7b260edc23c Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Sat, 16 Apr 2022 16:53:53 -0400 Subject: [PATCH] Version to 1.16.4 --- VERSION | 2 +- modules/tautulli.py | 14 ++------------ requirements.txt | 2 +- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/VERSION b/VERSION index 91cb9173..a2320736 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.16.3-develop23 +1.16.4 diff --git a/modules/tautulli.py b/modules/tautulli.py index 0e3fdb7a..a9c52911 100644 --- a/modules/tautulli.py +++ b/modules/tautulli.py @@ -38,7 +38,7 @@ class Tautulli: if items is None: raise Failed("Tautulli Error: No Items found in the response") - section_id = self._section_id(library.name) + section_id = library.Plex.key rating_keys = [] for item in items: if (all_items or item["section_id"] == section_id) and len(rating_keys) < int(params['list_size']): @@ -54,21 +54,11 @@ class Tautulli: if new_item: rating_keys.append((new_item[0].ratingKey, "ratingKey")) else: - logger.error(f"Plex Error: Item {item} not found") + logger.error(f"Plex Error: Item not found {item}") logger.debug("") logger.debug(f"{len(rating_keys)} Keys Found: {rating_keys}") return rating_keys - def _section_id(self, library_name): - response = self._request(f"{self.url}/api/v2?apikey={self.apikey}&cmd=get_library_names") - section_id = None - for entry in response["response"]["data"]: - if entry["section_name"] == library_name: - section_id = entry["section_id"] - break - if section_id: return section_id - else: raise Failed(f"Tautulli Error: No Library named {library_name} in the response") - def _request(self, url): if self.config.trace_mode: logger.debug(f"Tautulli URL: {url}") diff --git a/requirements.txt b/requirements.txt index 69df2dd9..77f8e1ce 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ PlexAPI==4.10.1 -tmdbapis==1.0.3 +tmdbapis==1.0.4 arrapi==1.3.1 lxml==4.8.0 requests==2.27.1