Merge pull request #735 from cptjhmiller/dev

Use correct item name
This commit is contained in:
adam111316 2014-08-20 07:35:23 +08:00
commit c745b5ada4

View file

@ -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,7 +78,9 @@ 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
if 'tvdb_id' in show:
if unicode(data['tvdb_id']) == show['tvdb_id']:
data_show = { data_show = {
'title': show['title'], 'title': show['title'],
'tvdb_id': show['tvdb_id'], 'tvdb_id': show['tvdb_id'],