Private GIT

Skip to content
Snippets Groups Projects
Commit fc7c7f99 authored by Alexandre Beloin's avatar Alexandre Beloin
Browse files

Merge pull request #1678 from Thraxis/trakt-changes

Trakt API Changes / Tweaks
parents 527942dd 106e2397
Branches
Tags
No related merge requests found
...@@ -10,7 +10,7 @@ class TraktAPI(): ...@@ -10,7 +10,7 @@ class TraktAPI():
self.password = password self.password = password
self.verify = not disable_ssl_verify self.verify = not disable_ssl_verify
self.timeout = timeout if timeout else None self.timeout = timeout if timeout else None
self.api_url = 'https://api.trakt.tv/' self.api_url = 'https://api-v2launch.trakt.tv/'
self.headers = { self.headers = {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'trakt-api-version': '2', 'trakt-api-version': '2',
......
...@@ -391,13 +391,17 @@ class TraktChecker(): ...@@ -391,13 +391,17 @@ class TraktChecker():
else: else:
watchlist = self.ShowWatchlist watchlist = self.ShowWatchlist
trakt_id = sickbeard.indexerApi(show_obj.indexer).config['trakt_id']
for watchlist_el in watchlist: for watchlist_el in watchlist:
trakt_id = sickbeard.indexerApi(show_obj.indexer).config['trakt_id']
if trakt_id == 'tvdb_id': if trakt_id == 'tvdb_id':
indexer_id = int(watchlist_el['show']['ids']["tvdb"]) indexer_id = int(watchlist_el['show']['ids']["tvdb"])
else: else:
if not watchlist_el['show']['ids']["tvrage"] is None:
indexer_id = int(watchlist_el['show']['ids']["tvrage"]) indexer_id = int(watchlist_el['show']['ids']["tvrage"])
else:
indexer_id = 0
if indexer_id == show_obj.indexerid and season is None and episode is None: if indexer_id == show_obj.indexerid and season is None and episode is None:
found=True found=True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment