From 27d34167e948925780e435a0211e2584335069c4 Mon Sep 17 00:00:00 2001 From: croneter Date: Sun, 9 Dec 2018 14:23:01 +0100 Subject: [PATCH] Fix current sync progress for more than 2000 items --- resources/lib/library_sync/full_sync.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/lib/library_sync/full_sync.py b/resources/lib/library_sync/full_sync.py index 2f78677d..97cc292c 100644 --- a/resources/lib/library_sync/full_sync.py +++ b/resources/lib/library_sync/full_sync.py @@ -88,7 +88,7 @@ class FullSync(common.libsync_mixin): self.show_dialog_userdata = utils.settings('playstate_sync_indicator') == 'true' self.dialog = None self.total = 0 - self.current = 1 + self.current = 0 self.processed = 0 self.title = '' self.section = None @@ -154,7 +154,6 @@ class FullSync(common.libsync_mixin): break LOG.debug('Start or continue processing section %s (%ss)', section.name, section.plex_type) - self.current = 1 self.processed = 0 self.total = section.total self.section_name = section.name @@ -189,8 +188,8 @@ class FullSync(common.libsync_mixin): else: raise ValueError('Unknown type %s' % type(item)) self.item_count -= 1 - self.update_progressbar() self.current += 1 + self.update_progressbar() if self.processed == 500: self.processed = 0 context.commit() @@ -215,6 +214,7 @@ class FullSync(common.libsync_mixin): last = True # To keep track of the item-number in order to kill while loops self.item_count = 0 + self.current = 0 while True: # Check Plex DB to see what we need to add/update with PlexDB() as self.plexdb: