mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2025-02-16 13:58:25 +00:00
true fix for #121
This commit is contained in:
parent
c306ee0e48
commit
adb08eb8e5
1 changed files with 5 additions and 3 deletions
|
@ -112,9 +112,11 @@ class TraktAPI:
|
|||
return requests.get(url, headers={"Content-Type": "application/json", "trakt-api-version": "2", "trakt-api-key": self.client_id}).json()
|
||||
|
||||
def get_pagenation(self, pagenation, amount, is_movie):
|
||||
items = self.send_request(f"{self.base_url}/{'movies' if is_movie else 'shows'}/{pagenation}?limit={amount}")
|
||||
if is_movie: return [item["movie"]["ids"]["tmdb"] for item in items], []
|
||||
else: return [], [item["show"]["ids"]["tvdb"] for item in items]
|
||||
items = self.send_request(f"{self.base_url}/{'movies' if not is_movie else 'shows'}/{pagenation}?limit={amount}")
|
||||
if pagenation == "popular" and is_movie: return [item["ids"]["tmdb"] for item in items], []
|
||||
elif pagenation == "popular": return [], [item["ids"]["tvdb"] for item in items]
|
||||
elif is_movie: return [item["movie"]["ids"]["tmdb"] for item in items], []
|
||||
else: return [], [item["show"]["ids"]["tvdb"] for item in items]
|
||||
|
||||
def validate_trakt_list(self, values):
|
||||
trakt_values = []
|
||||
|
|
Loading…
Add table
Reference in a new issue