mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-17 05:36:12 +00:00
perform all database commits at once instead of 1 by 1
This commit is contained in:
parent
e637af1b78
commit
383fb37ca3
3 changed files with 19 additions and 25 deletions
|
@ -180,12 +180,13 @@ class WebSocketThread(threading.Thread):
|
|||
self.update_items(itemsToUpdate)
|
||||
|
||||
def remove_items(self, itemsRemoved):
|
||||
connection = utils.KodiSQL()
|
||||
cursor = connection.cursor()
|
||||
for item in itemsRemoved:
|
||||
connection = utils.KodiSQL()
|
||||
cursor = connection.cursor()
|
||||
self.logMsg("Message : Doing LibraryChanged : Items Removed : Calling deleteEpisodeFromKodiLibraryByMbId: " + item, 0)
|
||||
WriteKodiDB().deleteItemFromKodiLibrary(item, connection, cursor)
|
||||
cursor.close()
|
||||
connection.commit()
|
||||
cursor.close()
|
||||
|
||||
def update_items(self, itemsToUpdate):
|
||||
# doing adds and updates
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue