Fix TypeError when marking item watched

This commit is contained in:
tomkat83 2016-04-11 15:01:25 +02:00
parent 48edee8656
commit f368f02abf

View file

@ -291,7 +291,10 @@ class Items(object):
utils.settings('markPlayed')), 1) utils.settings('markPlayed')), 1)
if complete >= float(utils.settings('markPlayed')): if complete >= float(utils.settings('markPlayed')):
self.logMsg('Marking as completely watched in Kodi', 1) self.logMsg('Marking as completely watched in Kodi', 1)
try:
item['viewCount'] += 1 item['viewCount'] += 1
except TypeError:
item['viewCount'] = 1
item['viewOffset'] = 0 item['viewOffset'] = 0
# Do the actual update # Do the actual update
self.kodi_db.addPlaystate(item['file_id'], self.kodi_db.addPlaystate(item['file_id'],