Update playstates and userratings only once

This commit is contained in:
tomkat83 2017-02-02 16:28:25 +01:00
parent 5799612879
commit 874e9a8fc5

View file

@ -533,10 +533,12 @@ class LibrarySync(Thread):
self.compare = not repair
self.new_items_only = True
# This will also update playstates and userratings!
log.info('Running fullsync for NEW PMS items with repair=%s' % repair)
if self._fullSync() is False:
return False
self.new_items_only = False
# This will NOT update playstates and userratings!
log.info('Running fullsync for CHANGED PMS items with repair=%s'
% repair)
if self._fullSync() is False:
@ -1106,6 +1108,10 @@ class LibrarySync(Thread):
also updates resume times.
This is done by downloading one XML for ALL elements with viewId
"""
if self.new_items_only is False:
# Only do this once for fullsync: the first run where new items are
# added to Kodi
return
xml = GetAllPlexLeaves(viewId,
lastViewedAt=lastViewedAt,
updatedAt=updatedAt,