Slight adjust for manual sync

Can't return value in __init__, instead calling a function to know if
manual sync succeeded or not.
This commit is contained in:
angelblue05 2016-03-08 18:51:23 -06:00
parent d6a79bf01b
commit 8bde429da4
2 changed files with 7 additions and 4 deletions

View file

@ -114,7 +114,7 @@ class Main:
import librarysync
lib = librarysync.LibrarySync()
if mode == "manualsync":
librarysync.ManualSync(dialog=True)
librarysync.ManualSync().sync(dialog=True)
else:
lib.fullSync(repair=True)
else:

View file

@ -93,7 +93,7 @@ class LibrarySync(threading.Thread):
if not completed:
# Fast sync failed or server plugin is not found
completed = ManualSync()
completed = ManualSync().sync()
else:
# Install sync is not completed
completed = self.fullSync()
@ -1069,11 +1069,14 @@ class LibrarySync(threading.Thread):
class ManualSync(LibrarySync):
def __init__(self, dialog=False):
def __init__(self):
LibrarySync.__init__(self)
self.fullSync(manualrun=True, forceddialog=dialog)
def sync(self, dialog=False):
return self.fullSync(manualrun=True, forceddialog=dialog)
def movies(self, embycursor, kodicursor, pdialog):