mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
add full sync entry to main listing
This commit is contained in:
parent
0cacd3ee87
commit
f3e7ac350d
3 changed files with 8 additions and 4 deletions
|
@ -50,6 +50,9 @@ elif mode == "adduser":
|
||||||
elif mode == "settings":
|
elif mode == "settings":
|
||||||
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)')
|
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)')
|
||||||
|
|
||||||
|
elif mode == "manualsync":
|
||||||
|
from LibrarySync import LibrarySync
|
||||||
|
LibrarySync().FullLibrarySync(True)
|
||||||
|
|
||||||
##### BROWSE EMBY CHANNELS ROOT #####
|
##### BROWSE EMBY CHANNELS ROOT #####
|
||||||
elif mode == "channels":
|
elif mode == "channels":
|
||||||
|
|
|
@ -424,10 +424,11 @@ def doMainListing():
|
||||||
if path:
|
if path:
|
||||||
addDirectoryItem(label, path)
|
addDirectoryItem(label, path)
|
||||||
|
|
||||||
# some extra entries for settinsg and stuff. TODO --> localize the labels
|
# some extra entries for settings and stuff. TODO --> localize the labels
|
||||||
addDirectoryItem("Settings", "plugin://plugin.video.emby/?mode=settings")
|
addDirectoryItem("Settings", "plugin://plugin.video.emby/?mode=settings")
|
||||||
|
addDirectoryItem("Perform manual sync", "plugin://plugin.video.emby/?mode=manualsync")
|
||||||
addDirectoryItem("Add user to session", "plugin://plugin.video.emby/?mode=adduser")
|
addDirectoryItem("Add user to session", "plugin://plugin.video.emby/?mode=adduser")
|
||||||
addDirectoryItem("Perform full resync", "plugin://plugin.video.emby/?mode=reset")
|
addDirectoryItem("Perform local database reset (full resync)", "plugin://plugin.video.emby/?mode=reset")
|
||||||
|
|
||||||
xbmcplugin.endOfDirectory(int(sys.argv[1]))
|
xbmcplugin.endOfDirectory(int(sys.argv[1]))
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ WINDOW = xbmcgui.Window( 10000 )
|
||||||
|
|
||||||
class LibrarySync():
|
class LibrarySync():
|
||||||
|
|
||||||
def FullLibrarySync(self):
|
def FullLibrarySync(self,manualRun=False):
|
||||||
|
|
||||||
#set some variable to check if this is the first run
|
#set some variable to check if this is the first run
|
||||||
addon = xbmcaddon.Addon(id='plugin.video.emby')
|
addon = xbmcaddon.Addon(id='plugin.video.emby')
|
||||||
|
@ -46,7 +46,7 @@ class LibrarySync():
|
||||||
|
|
||||||
#show the progress dialog
|
#show the progress dialog
|
||||||
pDialog = None
|
pDialog = None
|
||||||
if (syncInstallRunDone == False or dbSyncIndication):
|
if (syncInstallRunDone == False or dbSyncIndication or manualRun):
|
||||||
pDialog = xbmcgui.DialogProgressBG()
|
pDialog = xbmcgui.DialogProgressBG()
|
||||||
pDialog.create('Emby for Kodi', 'Performing full sync')
|
pDialog.create('Emby for Kodi', 'Performing full sync')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue