From 43a7886eae05de012aa8fc245c2149bed536c5dd Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Mon, 28 Mar 2016 10:51:38 +0200 Subject: [PATCH] Fix time sync for Music items --- resources/lib/kodidb_functions.py | 4 ++-- resources/lib/librarysync.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/lib/kodidb_functions.py b/resources/lib/kodidb_functions.py index da9551e3..65caf522 100644 --- a/resources/lib/kodidb_functions.py +++ b/resources/lib/kodidb_functions.py @@ -744,10 +744,10 @@ class Kodidb_Functions(): query = ' '.join(( "SELECT idSong", "FROM song", - "WHERE iTimesPlayed IS NULL OR iTimesPlayed = ''" + "WHERE iTimesPlayed = ?" )) try: - rows = self.cursor.execute(query) + rows = self.cursor.execute(query, (0, )) except: return [] ids = [] diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index f98da7c5..2030d836 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -1582,7 +1582,7 @@ class LibrarySync(Thread): self.showKodiNote(string(39407), forced=False) elif enableBackgroundSync: # Check back whether we should process something - if now - lastProcessing > 5: + if now - lastProcessing > 10: window('emby_dbScan', value="true") self.processItems() window('emby_dbScan', clear=True)