Merge pull request #34 from NickSC/master

This commit is contained in:
angelblue05 2016-04-29 15:08:54 -05:00
commit eef2db8285
4 changed files with 12 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:

View file

@ -298,6 +298,7 @@
<string id="30533">Duration of the music library pop up (in seconds)</string> <string id="30533">Duration of the music library pop up (in seconds)</string>
<string id="30534">Server messages</string> <string id="30534">Server messages</string>
<string id="30535">Generate a new device Id</string> <string id="30535">Generate a new device Id</string>
<string id="30536">Sync when screensaver is deactivated</string>
<!-- service add-on --> <!-- service add-on -->
<string id="33000">Welcome</string> <string id="33000">Welcome</string>

View file

@ -205,5 +205,12 @@ class KodiMonitor(xbmc.Monitor):
xbmc.sleep(10000) xbmc.sleep(10000)
utils.window('emby_onWake', value="true") utils.window('emby_onWake', value="true")
elif method == "GUI.OnScreensaverDeactivated":
if utils.settings('dbSyncScreensaver') == "true":
xbmc.sleep(1000);
utils.window('emby_onWake', value="true")
elif method == "Playlist.OnClear": elif method == "Playlist.OnClear":
pass pass

View file

@ -32,6 +32,7 @@
<setting id="enableTextureCache" label="30512" type="bool" default="true" /> <setting id="enableTextureCache" label="30512" type="bool" default="true" />
<setting id="imageCacheLimit" type="enum" label="30513" values="Disabled|5|10|15|20|25" default="0" visible="eq(-1,true)" subsetting="true" /> <setting id="imageCacheLimit" type="enum" label="30513" values="Disabled|5|10|15|20|25" default="0" visible="eq(-1,true)" subsetting="true" />
<setting id="syncEmptyShows" type="bool" label="30508" default="false" /> <setting id="syncEmptyShows" type="bool" label="30508" default="false" />
<setting id="dbSyncScreensaver" label="30536" type="bool" default="false" />
<setting id="useDirectPaths" type="enum" label="30511" values="Addon(Default)|Native(Direct paths)" default="0" /> <setting id="useDirectPaths" type="enum" label="30511" values="Addon(Default)|Native(Direct paths)" default="0" />
<setting id="enableMusic" type="bool" label="30509" default="true" /> <setting id="enableMusic" type="bool" label="30509" default="true" />
<setting id="streamMusic" type="bool" label="30510" default="false" visible="eq(-1,true)" subsetting="true" /> <setting id="streamMusic" type="bool" label="30510" default="false" visible="eq(-1,true)" subsetting="true" />