mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
No longer necessary.
This commit is contained in:
parent
bdea60fba3
commit
c25c2fc1bb
2 changed files with 16 additions and 19 deletions
|
@ -34,24 +34,22 @@ class Kodi_Monitor(xbmc.Monitor):
|
|||
downloadUtils = DownloadUtils()
|
||||
|
||||
if method == "VideoLibrary.OnUpdate":
|
||||
if WINDOW.getProperty('prevent_libraryUpdate') != "true":
|
||||
jsondata = json.loads(data)
|
||||
if jsondata != None:
|
||||
|
||||
playcount = None
|
||||
playcount = jsondata.get("playcount")
|
||||
item = jsondata.get("item").get("id")
|
||||
type = jsondata.get("item").get("type")
|
||||
prop = WINDOW.getProperty('Played%s%s' % (type,item))
|
||||
processWatched = WINDOW.getProperty('played_skipWatched')
|
||||
|
||||
if (playcount != None) and (prop != "true") and (processWatched != "true"):
|
||||
WINDOW.setProperty("Played%s%s" % (type,item), "true")
|
||||
utils.logMsg("MB# Sync","Kodi_Monitor--> VideoLibrary.OnUpdate : " + str(data),2)
|
||||
WriteKodiVideoDB().updatePlayCountFromKodi(item, type, playcount)
|
||||
|
||||
self.clearProperty(type,item)
|
||||
WINDOW.clearProperty('prevent_libraryUpdate')
|
||||
jsondata = json.loads(data)
|
||||
if jsondata != None:
|
||||
|
||||
playcount = None
|
||||
playcount = jsondata.get("playcount")
|
||||
item = jsondata.get("item").get("id")
|
||||
type = jsondata.get("item").get("type")
|
||||
prop = WINDOW.getProperty('Played%s%s' % (type,item))
|
||||
processWatched = WINDOW.getProperty('played_skipWatched')
|
||||
|
||||
if (playcount != None) and (prop != "true") and (processWatched != "true"):
|
||||
WINDOW.setProperty("Played%s%s" % (type,item), "true")
|
||||
utils.logMsg("MB# Sync","Kodi_Monitor--> VideoLibrary.OnUpdate : " + str(data),2)
|
||||
WriteKodiVideoDB().updatePlayCountFromKodi(item, type, playcount)
|
||||
|
||||
self.clearProperty(type,item)
|
||||
|
||||
if method == "System.OnWake":
|
||||
xbmc.sleep(10000) #Allow network to wake up
|
||||
|
|
|
@ -289,7 +289,6 @@ class WebSocketThread(threading.Thread):
|
|||
LibrarySync().IncrementalSync(itemsToUpdate)
|
||||
|
||||
def user_data_update(self, userDataList):
|
||||
self.WINDOW.setProperty('prevent_libraryUpdate', "true")
|
||||
itemsToUpdate = list()
|
||||
for userData in userDataList:
|
||||
itemId = userData.get("ItemId")
|
||||
|
|
Loading…
Reference in a new issue