mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 08:53:37 +00:00
commit
c745b5ada4
1 changed files with 14 additions and 11 deletions
|
@ -67,7 +67,8 @@ class TraktNotifier:
|
||||||
# URL parameters, should not need to recheck data (done above)
|
# URL parameters, should not need to recheck data (done above)
|
||||||
data = {
|
data = {
|
||||||
'tvdb_id': ep_obj.show.indexerid,
|
'tvdb_id': ep_obj.show.indexerid,
|
||||||
'title': ep_obj.show.name,'year': ep_obj.show.startyear
|
'title': ep_obj.show.name,
|
||||||
|
'year': ep_obj.show.startyear
|
||||||
}
|
}
|
||||||
TraktCall("show/unwatchlist/%API%", self._api(), self._username(), self._password(), data)
|
TraktCall("show/unwatchlist/%API%", self._api(), self._username(), self._password(), data)
|
||||||
|
|
||||||
|
@ -77,17 +78,19 @@ class TraktNotifier:
|
||||||
|
|
||||||
# Convert watchlist to only contain current show
|
# Convert watchlist to only contain current show
|
||||||
for show in watchlist:
|
for show in watchlist:
|
||||||
if unicode(data['shows'][0]['tvdb_id']) == show['tvdb_id']:
|
# Check if tvdb_id exists
|
||||||
data_show = {
|
if 'tvdb_id' in show:
|
||||||
'title': show['title'],
|
if unicode(data['tvdb_id']) == show['tvdb_id']:
|
||||||
'tvdb_id': show['tvdb_id'],
|
data_show = {
|
||||||
'episodes': []
|
'title': show['title'],
|
||||||
}
|
'tvdb_id': show['tvdb_id'],
|
||||||
|
'episodes': []
|
||||||
|
}
|
||||||
|
|
||||||
# Add series and episode (number) to the arry
|
# Add series and episode (number) to the arry
|
||||||
for episodes in show['episodes']:
|
for episodes in show['episodes']:
|
||||||
ep = {'season': episodes['season'], 'episode': episodes['number']}
|
ep = {'season': episodes['season'], 'episode': episodes['number']}
|
||||||
data_show['episodes'].append(ep)
|
data_show['episodes'].append(ep)
|
||||||
if data_show is not None:
|
if data_show is not None:
|
||||||
TraktCall("show/episode/unwatchlist/%API%", sickbeard.TRAKT_API, sickbeard.TRAKT_USERNAME, sickbeard.TRAKT_PASSWORD, data_show)
|
TraktCall("show/episode/unwatchlist/%API%", sickbeard.TRAKT_API, sickbeard.TRAKT_USERNAME, sickbeard.TRAKT_PASSWORD, data_show)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue