mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Episode delete test
This commit is contained in:
parent
0c92e86b39
commit
c90ae07a53
2 changed files with 13 additions and 0 deletions
|
@ -33,4 +33,15 @@ class Kodi_Monitor(xbmc.Monitor):
|
||||||
if playcount != None:
|
if playcount != None:
|
||||||
utils.logMsg("MB# Sync","Kodi_Monitor--> VideoLibrary.OnUpdate : " + str(data),2)
|
utils.logMsg("MB# Sync","Kodi_Monitor--> VideoLibrary.OnUpdate : " + str(data),2)
|
||||||
WriteKodiDB().updatePlayCountFromKodi(item, type, playcount)
|
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])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -868,6 +868,8 @@ class LibrarySync():
|
||||||
userData=API().getUserData(episode)
|
userData=API().getUserData(episode)
|
||||||
timeInfo = API().getTimeInfo(episode)
|
timeInfo = API().getTimeInfo(episode)
|
||||||
if kodiItem != None:
|
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")):
|
if kodiItem['playcount'] != int(userData.get("PlayCount")):
|
||||||
updated = WriteKodiDB().updateProperty(kodiItem,"playcount",int(userData.get("PlayCount")),"episode")
|
updated = WriteKodiDB().updateProperty(kodiItem,"playcount",int(userData.get("PlayCount")),"episode")
|
||||||
if(updated):
|
if(updated):
|
||||||
|
|
Loading…
Reference in a new issue