From 60f68610f496f8bf3fca92cc410c60c124642d70 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 18 Jan 2016 17:47:12 -0600 Subject: [PATCH] Close the kodi cursor earlier In case music doesn't complete correctly. --- resources/lib/librarysync.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index be3dc9a3..07d1c218 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -251,6 +251,9 @@ class LibrarySync(threading.Thread): self.logMsg( "SyncDatabase (finished %s in: %s)" % (itemtype, str(elapsedTime).split('.')[0]), 1) + else: + # Close the Kodi cursor + kodicursor.close() # sync music if music_enabled: @@ -282,7 +285,6 @@ class LibrarySync(threading.Thread): pDialog.close() embycursor.close() - kodicursor.close() utils.settings('SyncInstallRunDone', value="true") utils.settings("dbCreatedWithVersion", self.clientInfo.getVersion())