mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 18:26:15 +00:00
Fix dynamic widgets
This commit is contained in:
parent
1a1a306831
commit
7eaaa933b7
2 changed files with 12 additions and 4 deletions
|
@ -229,6 +229,15 @@ def browse(media, view_id=None, folder=None, server_id=None):
|
||||||
LOG.info("--[ v:%s/%s ] %s", view_id, media, folder)
|
LOG.info("--[ v:%s/%s ] %s", view_id, media, folder)
|
||||||
|
|
||||||
if not window('emby_online.bool') and server_id is None:
|
if not window('emby_online.bool') and server_id is None:
|
||||||
|
|
||||||
|
monitor = xbmc.Monitor()
|
||||||
|
|
||||||
|
for i in range(300):
|
||||||
|
if window('emby_online.bool'):
|
||||||
|
break
|
||||||
|
elif monitor.waitForAbort(0.1):
|
||||||
|
return
|
||||||
|
else:
|
||||||
LOG.error("Default server is not online.")
|
LOG.error("Default server is not online.")
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -376,7 +385,6 @@ def browse(media, view_id=None, folder=None, server_id=None):
|
||||||
xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_VIDEO_RATING)
|
xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_VIDEO_RATING)
|
||||||
xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_VIDEO_RUNTIME)
|
xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_VIDEO_RUNTIME)
|
||||||
|
|
||||||
LOG.info(content_type)
|
|
||||||
xbmcplugin.setContent(int(sys.argv[1]), content_type)
|
xbmcplugin.setContent(int(sys.argv[1]), content_type)
|
||||||
xbmcplugin.endOfDirectory(int(sys.argv[1]))
|
xbmcplugin.endOfDirectory(int(sys.argv[1]))
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ def window(key, value=None, clear=False, window_id=10000):
|
||||||
key = key.replace('.bool', "")
|
key = key.replace('.bool', "")
|
||||||
value = "true" if value else "false"
|
value = "true" if value else "false"
|
||||||
|
|
||||||
window.setProperty(key, value)
|
window.setProperty(key.replace('.json', "").replace('.bool', ""), value)
|
||||||
else:
|
else:
|
||||||
result = window.getProperty(key.replace('.json', "").replace('.bool', ""))
|
result = window.getProperty(key.replace('.json', "").replace('.bool', ""))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue