Fix TypeError when marking item watched
This commit is contained in:
parent
48edee8656
commit
f368f02abf
1 changed files with 4 additions and 1 deletions
|
@ -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'],
|
||||||
|
|
Loading…
Reference in a new issue