Sleep a bit before marking an item watched
This commit is contained in:
parent
1a24146e48
commit
81f0fe1157
1 changed files with 2 additions and 0 deletions
|
@ -6,6 +6,7 @@ import logging
|
||||||
from urllib import urlencode
|
from urllib import urlencode
|
||||||
from ntpath import dirname
|
from ntpath import dirname
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
from xbmc import sleep
|
||||||
|
|
||||||
import artwork
|
import artwork
|
||||||
from utils import tryEncode, tryDecode, settings, window, kodiSQL, \
|
from utils import tryEncode, tryDecode, settings, window, kodiSQL, \
|
||||||
|
@ -166,6 +167,7 @@ class Items(object):
|
||||||
% (item['ratingKey'], str(complete), MARK_PLAYED_AT), 1)
|
% (item['ratingKey'], str(complete), MARK_PLAYED_AT), 1)
|
||||||
if complete >= MARK_PLAYED_AT:
|
if complete >= MARK_PLAYED_AT:
|
||||||
log.info('Marking as completely watched in Kodi', 1)
|
log.info('Marking as completely watched in Kodi', 1)
|
||||||
|
sleep(500)
|
||||||
try:
|
try:
|
||||||
item['viewCount'] += 1
|
item['viewCount'] += 1
|
||||||
except TypeError:
|
except TypeError:
|
||||||
|
|
Loading…
Reference in a new issue