From 874e9a8fc5cabe1bfa200fd326b3d71febfdcc24 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Thu, 2 Feb 2017 16:28:25 +0100 Subject: [PATCH] Update playstates and userratings only once --- resources/lib/librarysync.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index 285cd972..279f679f 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -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,