Move last sync run save time to after the updates happen
This commit is contained in:
parent
c0238574b7
commit
05be6eaa07
1 changed files with 2 additions and 2 deletions
|
@ -103,8 +103,6 @@ class LibrarySync(threading.Thread):
|
||||||
LibrarySync().update_items(changedItems)
|
LibrarySync().update_items(changedItems)
|
||||||
LibrarySync().user_data_update(userChanges)
|
LibrarySync().user_data_update(userChanges)
|
||||||
|
|
||||||
self.SaveLastSync()
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
#set some variable to check if this is the first run
|
#set some variable to check if this is the first run
|
||||||
|
@ -859,6 +857,7 @@ class LibrarySync(threading.Thread):
|
||||||
listItems = self.updateItems
|
listItems = self.updateItems
|
||||||
self.updateItems = []
|
self.updateItems = []
|
||||||
self.IncrementalSync(listItems)
|
self.IncrementalSync(listItems)
|
||||||
|
self.SaveLastSync()
|
||||||
|
|
||||||
if len(self.removeItems) > 0:
|
if len(self.removeItems) > 0:
|
||||||
# Remove item from Kodi library
|
# Remove item from Kodi library
|
||||||
|
@ -866,6 +865,7 @@ class LibrarySync(threading.Thread):
|
||||||
listItems = self.removeItems
|
listItems = self.removeItems
|
||||||
self.removeItems = []
|
self.removeItems = []
|
||||||
self.removefromDB(listItems)
|
self.removefromDB(listItems)
|
||||||
|
self.SaveLastSync()
|
||||||
|
|
||||||
if self.KodiMonitor.waitForAbort(1):
|
if self.KodiMonitor.waitForAbort(1):
|
||||||
# Abort was requested while waiting. We should exit
|
# Abort was requested while waiting. We should exit
|
||||||
|
|
Loading…
Reference in a new issue