From 08a94a54272b57879a1ed6e646b3168a412c2ceb Mon Sep 17 00:00:00 2001 From: xnappo Date: Sat, 16 May 2015 11:04:09 -0500 Subject: [PATCH] Commit not needed if using same connection --- resources/lib/WebSocketClient.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/lib/WebSocketClient.py b/resources/lib/WebSocketClient.py index 0a611c82..0fd37d01 100644 --- a/resources/lib/WebSocketClient.py +++ b/resources/lib/WebSocketClient.py @@ -261,7 +261,6 @@ class WebSocketThread(threading.Thread): showId=ReadKodiDB().getShowIdByEmbyId(item, connection, cursor) # Get the TV Show ID self.logMsg("ShowID: " + str(showId),0) WriteKodiVideoDB().deleteItemFromKodiLibrary(item, connection, cursor) - connection.commit() #Need to commit so that the count will be right - can't use one in case of multiple deletes if type == "episode": showTotalCount = ReadKodiDB().getShowTotalCount(showId, connection, cursor) # Check if there are no episodes left self.logMsg("ShowTotalCount: " + str(showTotalCount),0) @@ -269,7 +268,7 @@ class WebSocketThread(threading.Thread): embyId=ReadKodiDB().getEmbyIdByKodiId(showId, "tvshow", connection, cursor) self.logMsg("Message : Doing LibraryChanged : Deleting show:" + embyId, 0) WriteKodiVideoDB().deleteItemFromKodiLibrary(embyId, connection, cursor) - connection.commit() + connection.commit() cursor.close() #Process music library