added "fastsync" command to perform an incremental sync on demand

This commit is contained in:
Nick 2016-04-28 19:05:33 +10:00
parent 3dbdab79a9
commit 5696f76a5f
1 changed files with 3 additions and 1 deletions

View File

@ -102,7 +102,7 @@ class Main:
# Other functions # Other functions
if mode == "settings": if mode == "settings":
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)') xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)')
elif mode in ("manualsync", "repair"): elif mode in ("manualsync", "fastsync", "repair"):
if utils.window('emby_online') != "true": if utils.window('emby_online') != "true":
# Server is not online, do not run the sync # Server is not online, do not run the sync
xbmcgui.Dialog().ok(heading="Emby for Kodi", xbmcgui.Dialog().ok(heading="Emby for Kodi",
@ -116,6 +116,8 @@ class Main:
lib = librarysync.LibrarySync() lib = librarysync.LibrarySync()
if mode == "manualsync": if mode == "manualsync":
librarysync.ManualSync().sync(dialog=True) librarysync.ManualSync().sync(dialog=True)
elif mode == "fastsync":
lib.startSync()
else: else:
lib.fullSync(repair=True) lib.fullSync(repair=True)
else: else: