fix delete TV Show
This commit is contained in:
parent
6f11368575
commit
685cf9ae81
2 changed files with 7 additions and 4 deletions
|
@ -569,7 +569,7 @@ class LibrarySync():
|
|||
allMB3TVShows = set(allTVShows)
|
||||
for show in allKodiShows:
|
||||
if not show in allMB3TVShows:
|
||||
WriteKodiDB().deleteTVShowFromKodiLibrary(dir)
|
||||
WriteKodiDB().deleteTVShowFromKodiLibrary(show)
|
||||
totalItemsDeleted += 1
|
||||
|
||||
if(self.ShouldStop(pDialog)):
|
||||
|
|
|
@ -1066,10 +1066,13 @@ class WriteKodiDB():
|
|||
def deleteTVShowFromKodiLibrary(self, id):
|
||||
xbmc.sleep(sleepVal)
|
||||
kodiItem = ReadKodiDB().getKodiTVShow(id)
|
||||
utils.logMsg("deleting tvshow from Kodi library",id)
|
||||
utils.logMsg("deleting tvshow from Kodi library ", "Emby ID : " + id)
|
||||
|
||||
if kodiItem != None:
|
||||
xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "VideoLibrary.RemoveTVShow", "params": { "tvshowid": %i}, "id": 1 }' %(kodiItem["tvshowid"]))
|
||||
utils.logMsg("deleting tvshow from Kodi library ", str(kodiItem))
|
||||
kodiId = kodiItem["tvshowid"]
|
||||
utils.logMsg("deleting tvshow from Kodi library ", "Kodi ID : " + str(kodiId))
|
||||
xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "VideoLibrary.RemoveTVShow", "params": { "tvshowid": %i}, "id": 1 }' %(kodiId))
|
||||
|
||||
def updateSeasons(self,MBitem, KodiItem):
|
||||
#use sqlite to set the season details because no method in API available for this
|
||||
|
|
Loading…
Reference in a new issue