From e129c940539304ae60d9bbf9a965f40292d49333 Mon Sep 17 00:00:00 2001 From: Croneter Date: Mon, 14 May 2018 20:23:39 +0200 Subject: [PATCH] Ensure movies and tv shows are synced before music --- resources/lib/librarysync.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index c6cfa10d..e24b89f7 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -263,16 +263,13 @@ class LibrarySync(Thread): return True def _full_sync(self): - process = { - 'movies': self.plex_movies, - 'tvshows': self.plex_tv_show, - } + process = [self.plex_movies, self.plex_tv_show] if state.ENABLE_MUSIC: - process['music'] = self.plex_music + process.append(self.plex_music) # Do the processing - for itemtype in process: - if self.suspend_item_sync() or not process[itemtype](): + for kind in process: + if self.suspend_item_sync() or not kind(): return False # Let kodi update the views in any case, since we're doing a full sync