From 06cd0e981c95896247ce4e4372152e142389b48d Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Thu, 18 Feb 2016 19:16:49 -0600 Subject: [PATCH] Hide manual sync when ran at start-up --- default.py | 2 +- resources/lib/librarysync.py | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/default.py b/default.py index 91daef65..1bd09c43 100644 --- a/default.py +++ b/default.py @@ -107,7 +107,7 @@ class Main: import librarysync lib = librarysync.LibrarySync() if mode == "manualsync": - librarysync.ManualSync() + librarysync.ManualSync(dialog=True) else: lib.fullSync(repair=True) else: diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index 261e6c48..c894f0c5 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -219,7 +219,7 @@ class LibrarySync(threading.Thread): connection.commit() log("Commit successful.", 1) - def fullSync(self, manualrun=False, repair=False): + def fullSync(self, manualrun=False, repair=False, forceddialog=False): log = self.logMsg window = utils.window @@ -254,11 +254,13 @@ class LibrarySync(threading.Thread): message = "Manual sync" elif repair: message = "Repair sync" + forceddialog = True else: message = "Initial sync" + forceddialog = True window('emby_initialScan', value="true") - pDialog = self.progressDialog("%s" % message, forced=True) + pDialog = self.progressDialog("%s" % message, forced=forceddialog) starttotal = datetime.now() # Set views @@ -980,10 +982,10 @@ class LibrarySync(threading.Thread): class ManualSync(LibrarySync): - def __init__(self): + def __init__(self, dialog=False): LibrarySync.__init__(self) - self.fullSync(manualrun=True) + self.fullSync(manualrun=True, forceddialog=dialog) def movies(self, embycursor, kodicursor, pdialog):