Episode delete test

This commit is contained in:
xnappo 2015-03-23 19:35:00 -05:00
parent 0c92e86b39
commit c90ae07a53
2 changed files with 13 additions and 0 deletions

View file

@ -33,4 +33,15 @@ class Kodi_Monitor(xbmc.Monitor):
if playcount != None:
utils.logMsg("MB# Sync","Kodi_Monitor--> VideoLibrary.OnUpdate : " + str(data),2)
WriteKodiDB().updatePlayCountFromKodi(item, type, playcount)
if method == "VideoLibrary.OnRemove":
jsondata = json.loads(data)
if jsondata != None:
if jsondata.get("type") == "episode":
episodeid = jsondata.get("id")
WINDOW = xbmcgui.Window( 10000 )
MBlist = WINDOW.getProperty("episodeid" + str(episodeid)).split(";;")
return_value = xbmcgui.Dialog().yesno("Confirm Delete", "Not really going to, but if I were I would delete: Title - "+ MBlist[0] + " MBID: " + MBlist[1])

View file

@ -868,6 +868,8 @@ class LibrarySync():
userData=API().getUserData(episode)
timeInfo = API().getTimeInfo(episode)
if kodiItem != None:
WINDOW = xbmcgui.Window( 10000 )
WINDOW.setProperty("episodeid" + str(kodiItem['episodeid']), episode.get('Name') + ";;" + episode.get('Id'))
if kodiItem['playcount'] != int(userData.get("PlayCount")):
updated = WriteKodiDB().updateProperty(kodiItem,"playcount",int(userData.get("PlayCount")),"episode")
if(updated):