mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-13 21:56:11 +00:00
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:
parent
d6a79bf01b
commit
8bde429da4
2 changed files with 7 additions and 4 deletions
|
@ -114,7 +114,7 @@ class Main:
|
||||||
import librarysync
|
import librarysync
|
||||||
lib = librarysync.LibrarySync()
|
lib = librarysync.LibrarySync()
|
||||||
if mode == "manualsync":
|
if mode == "manualsync":
|
||||||
librarysync.ManualSync(dialog=True)
|
librarysync.ManualSync().sync(dialog=True)
|
||||||
else:
|
else:
|
||||||
lib.fullSync(repair=True)
|
lib.fullSync(repair=True)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -93,7 +93,7 @@ class LibrarySync(threading.Thread):
|
||||||
|
|
||||||
if not completed:
|
if not completed:
|
||||||
# Fast sync failed or server plugin is not found
|
# Fast sync failed or server plugin is not found
|
||||||
completed = ManualSync()
|
completed = ManualSync().sync()
|
||||||
else:
|
else:
|
||||||
# Install sync is not completed
|
# Install sync is not completed
|
||||||
completed = self.fullSync()
|
completed = self.fullSync()
|
||||||
|
@ -1069,10 +1069,13 @@ class LibrarySync(threading.Thread):
|
||||||
class ManualSync(LibrarySync):
|
class ManualSync(LibrarySync):
|
||||||
|
|
||||||
|
|
||||||
def __init__(self, dialog=False):
|
def __init__(self):
|
||||||
|
|
||||||
LibrarySync.__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):
|
def movies(self, embycursor, kodicursor, pdialog):
|
||||||
|
|
Loading…
Reference in a new issue