Hide manual sync when ran at start-up
This commit is contained in:
parent
c40aa46b64
commit
06cd0e981c
2 changed files with 7 additions and 5 deletions
|
@ -107,7 +107,7 @@ class Main:
|
||||||
import librarysync
|
import librarysync
|
||||||
lib = librarysync.LibrarySync()
|
lib = librarysync.LibrarySync()
|
||||||
if mode == "manualsync":
|
if mode == "manualsync":
|
||||||
librarysync.ManualSync()
|
librarysync.ManualSync(dialog=True)
|
||||||
else:
|
else:
|
||||||
lib.fullSync(repair=True)
|
lib.fullSync(repair=True)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -219,7 +219,7 @@ class LibrarySync(threading.Thread):
|
||||||
connection.commit()
|
connection.commit()
|
||||||
log("Commit successful.", 1)
|
log("Commit successful.", 1)
|
||||||
|
|
||||||
def fullSync(self, manualrun=False, repair=False):
|
def fullSync(self, manualrun=False, repair=False, forceddialog=False):
|
||||||
|
|
||||||
log = self.logMsg
|
log = self.logMsg
|
||||||
window = utils.window
|
window = utils.window
|
||||||
|
@ -254,11 +254,13 @@ class LibrarySync(threading.Thread):
|
||||||
message = "Manual sync"
|
message = "Manual sync"
|
||||||
elif repair:
|
elif repair:
|
||||||
message = "Repair sync"
|
message = "Repair sync"
|
||||||
|
forceddialog = True
|
||||||
else:
|
else:
|
||||||
message = "Initial sync"
|
message = "Initial sync"
|
||||||
|
forceddialog = True
|
||||||
window('emby_initialScan', value="true")
|
window('emby_initialScan', value="true")
|
||||||
|
|
||||||
pDialog = self.progressDialog("%s" % message, forced=True)
|
pDialog = self.progressDialog("%s" % message, forced=forceddialog)
|
||||||
starttotal = datetime.now()
|
starttotal = datetime.now()
|
||||||
|
|
||||||
# Set views
|
# Set views
|
||||||
|
@ -980,10 +982,10 @@ class LibrarySync(threading.Thread):
|
||||||
class ManualSync(LibrarySync):
|
class ManualSync(LibrarySync):
|
||||||
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self, dialog=False):
|
||||||
|
|
||||||
LibrarySync.__init__(self)
|
LibrarySync.__init__(self)
|
||||||
self.fullSync(manualrun=True)
|
self.fullSync(manualrun=True, forceddialog=dialog)
|
||||||
|
|
||||||
|
|
||||||
def movies(self, embycursor, kodicursor, pdialog):
|
def movies(self, embycursor, kodicursor, pdialog):
|
||||||
|
|
Loading…
Reference in a new issue