diff --git a/resources/lib/library_sync/full_sync.py b/resources/lib/library_sync/full_sync.py index 9dab3bd9..8c64f771 100644 --- a/resources/lib/library_sync/full_sync.py +++ b/resources/lib/library_sync/full_sync.py @@ -104,8 +104,7 @@ class FullSync(common.libsync_mixin): plex_type=self.plex_type) # Tell the processing thread about this new section queue_info = InitNewSection(self.context, - utils.cast(int, - iterator.get('totalSize', 0)), + iterator.total, iterator.get('librarySectionTitle'), section['section_id'], self.plex_type) @@ -131,8 +130,7 @@ class FullSync(common.libsync_mixin): plex_type=self.plex_type) # Tell the processing thread that we're syncing playstate queue_info = InitNewSection(self.context, - utils.cast(int, - iterator.get('totalSize', 0)), + iterator.total, iterator.get('librarySectionTitle'), section['section_id'], self.plex_type) diff --git a/resources/lib/library_sync/process_metadata.py b/resources/lib/library_sync/process_metadata.py index 50113912..be6adfb5 100644 --- a/resources/lib/library_sync/process_metadata.py +++ b/resources/lib/library_sync/process_metadata.py @@ -66,7 +66,7 @@ class ProcessMetadata(backgroundthread.KillableThread, common.libsync_mixin): except ZeroDivisionError: progress = 0 self.dialog.update(progress, - '%s: %s' % (self.section_type_text, self.section_name), + '%s (%s)' % (self.section_name, self.section_type_text), '%s/%s: %s' % (self.current, self.total, self.title)) diff --git a/resources/lib/plex_functions.py b/resources/lib/plex_functions.py index 27abb4c1..fdb8301b 100644 --- a/resources/lib/plex_functions.py +++ b/resources/lib/plex_functions.py @@ -617,10 +617,11 @@ class DownloadGen(object): self.current += 1 child = self.xml[0] self.xml.remove(child) - if self.current % CONTAINERSIZE == 0: + if (self.current % CONTAINERSIZE == 0 and + self.current < self.total - self.cache_factor * CONTAINERSIZE): + self.pending_counter.append(None) self._download_chunk( start=self.current + (self.cache_factor - 1) * CONTAINERSIZE) - self.pending_counter.append(None) return child sleep(100) if not len(self.pending_counter) and not len(self.xml):