From 81f0fe115774cc9a2d13a8a0c3b7bb51f55c46d4 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sat, 18 Feb 2017 16:45:57 +0100 Subject: [PATCH] Sleep a bit before marking an item watched --- resources/lib/itemtypes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index 19ee59c8..35809efe 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -6,6 +6,7 @@ import logging from urllib import urlencode from ntpath import dirname from datetime import datetime +from xbmc import sleep import artwork from utils import tryEncode, tryDecode, settings, window, kodiSQL, \ @@ -166,6 +167,7 @@ class Items(object): % (item['ratingKey'], str(complete), MARK_PLAYED_AT), 1) if complete >= MARK_PLAYED_AT: log.info('Marking as completely watched in Kodi', 1) + sleep(500) try: item['viewCount'] += 1 except TypeError: