From 8bde429da41ac2cc70b8f2f11c44d2802f1c1088 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Tue, 8 Mar 2016 18:51:23 -0600 Subject: [PATCH] Slight adjust for manual sync Can't return value in __init__, instead calling a function to know if manual sync succeeded or not. --- default.py | 2 +- resources/lib/librarysync.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/default.py b/default.py index 40c4edf4..724e7303 100644 --- a/default.py +++ b/default.py @@ -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: diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index 4b885ca9..dacebbde 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -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):