mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 10:46:11 +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()
|
downloadUtils = DownloadUtils()
|
||||||
|
|
||||||
if method == "VideoLibrary.OnUpdate":
|
if method == "VideoLibrary.OnUpdate":
|
||||||
if WINDOW.getProperty('prevent_libraryUpdate') != "true":
|
jsondata = json.loads(data)
|
||||||
jsondata = json.loads(data)
|
if jsondata != None:
|
||||||
if jsondata != None:
|
|
||||||
|
|
||||||
playcount = None
|
playcount = None
|
||||||
playcount = jsondata.get("playcount")
|
playcount = jsondata.get("playcount")
|
||||||
item = jsondata.get("item").get("id")
|
item = jsondata.get("item").get("id")
|
||||||
type = jsondata.get("item").get("type")
|
type = jsondata.get("item").get("type")
|
||||||
prop = WINDOW.getProperty('Played%s%s' % (type,item))
|
prop = WINDOW.getProperty('Played%s%s' % (type,item))
|
||||||
processWatched = WINDOW.getProperty('played_skipWatched')
|
processWatched = WINDOW.getProperty('played_skipWatched')
|
||||||
|
|
||||||
if (playcount != None) and (prop != "true") and (processWatched != "true"):
|
if (playcount != None) and (prop != "true") and (processWatched != "true"):
|
||||||
WINDOW.setProperty("Played%s%s" % (type,item), "true")
|
WINDOW.setProperty("Played%s%s" % (type,item), "true")
|
||||||
utils.logMsg("MB# Sync","Kodi_Monitor--> VideoLibrary.OnUpdate : " + str(data),2)
|
utils.logMsg("MB# Sync","Kodi_Monitor--> VideoLibrary.OnUpdate : " + str(data),2)
|
||||||
WriteKodiVideoDB().updatePlayCountFromKodi(item, type, playcount)
|
WriteKodiVideoDB().updatePlayCountFromKodi(item, type, playcount)
|
||||||
|
|
||||||
self.clearProperty(type,item)
|
self.clearProperty(type,item)
|
||||||
WINDOW.clearProperty('prevent_libraryUpdate')
|
|
||||||
|
|
||||||
if method == "System.OnWake":
|
if method == "System.OnWake":
|
||||||
xbmc.sleep(10000) #Allow network to wake up
|
xbmc.sleep(10000) #Allow network to wake up
|
||||||
|
|
|
@ -289,7 +289,6 @@ class WebSocketThread(threading.Thread):
|
||||||
LibrarySync().IncrementalSync(itemsToUpdate)
|
LibrarySync().IncrementalSync(itemsToUpdate)
|
||||||
|
|
||||||
def user_data_update(self, userDataList):
|
def user_data_update(self, userDataList):
|
||||||
self.WINDOW.setProperty('prevent_libraryUpdate', "true")
|
|
||||||
itemsToUpdate = list()
|
itemsToUpdate = list()
|
||||||
for userData in userDataList:
|
for userData in userDataList:
|
||||||
itemId = userData.get("ItemId")
|
itemId = userData.get("ItemId")
|
||||||
|
|
Loading…
Reference in a new issue