From bd4c59f28654a78e7f6571bcaeeadd7cd017b4b5 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Thu, 5 Aug 2021 14:17:52 -0400 Subject: [PATCH] fix unhashable error --- modules/builder.py | 4 ++-- modules/trakt.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/builder.py b/modules/builder.py index bc5607e3..403627f6 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -1029,7 +1029,7 @@ class CollectionBuilder: movie_rating_keys = [] for movie_id in movie_ids: if movie_id in self.library.movie_map: - movie_rating_keys.append(self.library.movie_map[movie_id]) + movie_rating_keys.append(self.library.movie_map[movie_id][0]) elif movie_id not in self.missing_movies: self.missing_movies.append(movie_id) add_rating_keys(movie_rating_keys) @@ -1038,7 +1038,7 @@ class CollectionBuilder: show_rating_keys = [] for show_id in show_ids: if show_id in self.library.show_map: - show_rating_keys.append(self.library.show_map[show_id]) + show_rating_keys.append(self.library.show_map[show_id][0]) elif show_id not in self.missing_shows: self.missing_shows.append(show_id) add_rating_keys(show_rating_keys) diff --git a/modules/trakt.py b/modules/trakt.py index be0b5525..6c8391d3 100644 --- a/modules/trakt.py +++ b/modules/trakt.py @@ -107,7 +107,7 @@ class Trakt: while current <= pages: if pages == 1: response = self.config.get(f"{base_url}{url}", headers=headers) - if "X-Pagination-Page-Count" in response.headers: + if "X-Pagination-Page-Count" in response.headers and "?" not in url: pages = int(response.headers["X-Pagination-Page-Count"]) else: response = self.config.get(f"{base_url}{url}?page={current}", headers=headers)