mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-27 03:06:10 +00:00
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)
|
allMB3TVShows = set(allTVShows)
|
||||||
for show in allKodiShows:
|
for show in allKodiShows:
|
||||||
if not show in allMB3TVShows:
|
if not show in allMB3TVShows:
|
||||||
WriteKodiDB().deleteTVShowFromKodiLibrary(dir)
|
WriteKodiDB().deleteTVShowFromKodiLibrary(show)
|
||||||
totalItemsDeleted += 1
|
totalItemsDeleted += 1
|
||||||
|
|
||||||
if(self.ShouldStop(pDialog)):
|
if(self.ShouldStop(pDialog)):
|
||||||
|
|
|
@ -1063,13 +1063,16 @@ class WriteKodiDB():
|
||||||
finally:
|
finally:
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
|
||||||
def deleteTVShowFromKodiLibrary(self, id ):
|
def deleteTVShowFromKodiLibrary(self, id):
|
||||||
xbmc.sleep(sleepVal)
|
xbmc.sleep(sleepVal)
|
||||||
kodiItem = ReadKodiDB().getKodiTVShow(id)
|
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:
|
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):
|
def updateSeasons(self,MBitem, KodiItem):
|
||||||
#use sqlite to set the season details because no method in API available for this
|
#use sqlite to set the season details because no method in API available for this
|
||||||
|
|
Loading…
Reference in a new issue