mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-16 21:26:14 +00:00
support deletions for musiclibrary sync
This commit is contained in:
parent
a12f6093dd
commit
507dd340cd
2 changed files with 24 additions and 14 deletions
|
@ -180,13 +180,26 @@ class WebSocketThread(threading.Thread):
|
|||
self.update_items(itemsToUpdate)
|
||||
|
||||
def remove_items(self, itemsRemoved):
|
||||
connection = utils.KodiSQL()
|
||||
|
||||
#Process video library
|
||||
connection = utils.KodiSQL("video")
|
||||
cursor = connection.cursor()
|
||||
for item in itemsRemoved:
|
||||
self.logMsg("Message : Doing LibraryChanged : Items Removed : Calling deleteEpisodeFromKodiLibraryByMbId: " + item, 0)
|
||||
self.logMsg("Message : Doing LibraryChanged : Items Removed : Calling deleteItemFromKodiLibrary: " + item, 0)
|
||||
WriteKodiVideoDB().deleteItemFromKodiLibrary(item, connection, cursor)
|
||||
connection.commit()
|
||||
cursor.close()
|
||||
|
||||
#Process music library
|
||||
addon = xbmcaddon.Addon(id='plugin.video.emby')
|
||||
if addon.getSetting("enableMusicSync") == "true":
|
||||
connection = utils.KodiSQL("music")
|
||||
cursor = connection.cursor()
|
||||
for item in itemsRemoved:
|
||||
self.logMsg("Message : Doing LibraryChanged : Items Removed : Calling deleteItemFromKodiLibrary (musiclibrary): " + item, 0)
|
||||
WriteKodiMusicDB().deleteItemFromKodiLibrary(item, connection, cursor)
|
||||
connection.commit()
|
||||
cursor.close()
|
||||
|
||||
def update_items(self, itemsToUpdate):
|
||||
# doing adds and updates
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue