Add check update option

To manually look for an update regarding objects (pulled from plugin.video.emby branch)
This commit is contained in:
angelblue05 2018-09-08 03:35:48 -05:00
parent 71eea37448
commit e6556b28d1
3 changed files with 8 additions and 1 deletions

View file

@ -107,6 +107,8 @@ class Events(object):
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)') xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)')
elif mode == 'adduser': elif mode == 'adduser':
add_user() add_user()
elif mode == 'checkupdate':
event('CheckUpdate')
elif mode == 'updateserver': elif mode == 'updateserver':
event('UpdateServer') event('UpdateServer')
elif mode == 'thememedia': elif mode == 'thememedia':

View file

@ -171,7 +171,7 @@ class Service(xbmc.Monitor):
'LibraryChanged', 'ServerOnline', 'SyncLibrary', 'RepairLibrary', 'RemoveLibrary', 'LibraryChanged', 'ServerOnline', 'SyncLibrary', 'RepairLibrary', 'RemoveLibrary',
'EmbyConnect', 'SyncLibrarySelection', 'RepairLibrarySelection', 'AddServer', 'EmbyConnect', 'SyncLibrarySelection', 'RepairLibrarySelection', 'AddServer',
'Unauthorized', 'UpdateServer', 'UserConfigurationUpdated', 'ServerRestarting', 'Unauthorized', 'UpdateServer', 'UserConfigurationUpdated', 'ServerRestarting',
'RemoveServer', 'AddLibrarySelection'): 'RemoveServer', 'AddLibrarySelection', 'CheckUpdate'):
return return
data = json.loads(data)[0] data = json.loads(data)[0]
@ -326,6 +326,10 @@ class Service(xbmc.Monitor):
if data.get('ServerId') is None: if data.get('ServerId') is None:
Views().get_views() Views().get_views()
elif method == 'CheckUpdate':
if not self.check_update():
dialog("notification", heading="{emby}", message=_(21341), icon="{emby}", sound=False)
def onSettingsChanged(self): def onSettingsChanged(self):
''' React to setting changes that impact window values. ''' React to setting changes that impact window values.

View file

@ -86,6 +86,7 @@
<setting label="30529" id="startupDelay" type="number" default="0" option="int" /> <setting label="30529" id="startupDelay" type="number" default="0" option="int" />
<setting label="30239" type="action" action="RunPlugin(plugin://plugin.video.emby?mode=reset)" option="close" /> <setting label="30239" type="action" action="RunPlugin(plugin://plugin.video.emby?mode=reset)" option="close" />
<setting label="30535" type="action" action="RunPlugin(plugin://plugin.video.emby?mode=deviceid)" /> <setting label="30535" type="action" action="RunPlugin(plugin://plugin.video.emby?mode=deviceid)" />
<setting label="24034" type="action" action="RunPlugin(plugin://plugin.video.emby?mode=checkupdate)" />
<setting type="sep"/> <setting type="sep"/>
<setting label="33104" type="lsep"/> <setting label="33104" type="lsep"/>