From fc1344b7da130d5fb00ebf9349601ec740e24d5c Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Tue, 25 Aug 2015 22:21:31 -0500 Subject: [PATCH] Add option to sync empty tv shows --- resources/lib/LibrarySync.py | 6 +++--- resources/settings.xml | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/lib/LibrarySync.py b/resources/lib/LibrarySync.py index b5957afb..ecbe9875 100644 --- a/resources/lib/LibrarySync.py +++ b/resources/lib/LibrarySync.py @@ -360,7 +360,7 @@ class LibrarySync(threading.Thread): pDialog.update(percentage, "Emby for Kodi - Running Sync", progressTitle) count += 1 - if item.get('IsFolder') and item.get('RecursiveItemCount') != 0: + if utils.settings('syncEmptyShows') == "true" or (item.get('IsFolder') and item.get('RecursiveItemCount') != 0): allEmbyTvShowIds.append(item["Id"]) #build a list with all Id's and get the existing entry (if exists) in Kodi DB @@ -650,7 +650,7 @@ class LibrarySync(threading.Thread): percentage = int(((float(count) / float(total)) * 100)) pDialog.update(percentage, "Emby for Kodi - Incremental Sync Tv", progressTitle) count = count + 1 - if item.get('IsFolder') and item.get('RecursiveItemCount') != 0: + if utils.settings('syncEmptyShows') == "true" or (item.get('IsFolder') and item.get('RecursiveItemCount') != 0): kodiId = WriteKodiVideoDB().addOrUpdateTvShowToKodiLibrary(item["Id"],connection, cursor, view.get('title')) @@ -1045,4 +1045,4 @@ class LibrarySync(threading.Thread): def resumeClient(self): self.suspendClient = False - self.logMsg("--- Library Sync Thread resumed ---", 0) + self.logMsg("--- Library Sync Thread resumed ---", 0) \ No newline at end of file diff --git a/resources/settings.xml b/resources/settings.xml index 59d9fe21..3ca97d9c 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -22,9 +22,10 @@ + - +