mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-09-18 20:44:39 +00:00
fix delete item event
This commit is contained in:
parent
9e004fa1a1
commit
59713c80da
3 changed files with 42 additions and 6 deletions
|
@ -923,6 +923,15 @@ class WriteKodiDB():
|
|||
else:
|
||||
utils.logMsg("episode not found in kodi DB",episodeid)
|
||||
|
||||
def deleteEpisodeFromKodiLibraryByMbId(self, id ):
|
||||
utils.logMsg("deleting episode from Kodi library", id)
|
||||
kodiItem = ReadKodiDB().getKodiEpisodeByMbItemEx(id)
|
||||
if kodiItem != None:
|
||||
xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "VideoLibrary.RemoveEpisode", "params": { "episodeid": %i}, "id": 1 }' %(kodiItem["episodeid"]))
|
||||
utils.logMsg("episode deleted succesfully!", id)
|
||||
else:
|
||||
utils.logMsg("episode not found in kodi DB", id)
|
||||
|
||||
def addTVShowToKodiLibrary( self, MBitem, connection, cursor ):
|
||||
#adds a Tvshow to Kodi by directly inserting it to the DB while there is no addTvShow available on the json API
|
||||
#TODO: PR at Kodi team for a addTvShow endpoint on their API
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue