From e6556b28d16584def217480a09359319634bf024 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 8 Sep 2018 03:35:48 -0500 Subject: [PATCH] Add check update option To manually look for an update regarding objects (pulled from plugin.video.emby branch) --- resources/lib/entrypoint/default.py | 2 ++ resources/lib/entrypoint/service.py | 6 +++++- resources/settings.xml | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/resources/lib/entrypoint/default.py b/resources/lib/entrypoint/default.py index f1b953f7..0ebe14b5 100644 --- a/resources/lib/entrypoint/default.py +++ b/resources/lib/entrypoint/default.py @@ -107,6 +107,8 @@ class Events(object): xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)') elif mode == 'adduser': add_user() + elif mode == 'checkupdate': + event('CheckUpdate') elif mode == 'updateserver': event('UpdateServer') elif mode == 'thememedia': diff --git a/resources/lib/entrypoint/service.py b/resources/lib/entrypoint/service.py index 95e5d242..25f0f58f 100644 --- a/resources/lib/entrypoint/service.py +++ b/resources/lib/entrypoint/service.py @@ -171,7 +171,7 @@ class Service(xbmc.Monitor): 'LibraryChanged', 'ServerOnline', 'SyncLibrary', 'RepairLibrary', 'RemoveLibrary', 'EmbyConnect', 'SyncLibrarySelection', 'RepairLibrarySelection', 'AddServer', 'Unauthorized', 'UpdateServer', 'UserConfigurationUpdated', 'ServerRestarting', - 'RemoveServer', 'AddLibrarySelection'): + 'RemoveServer', 'AddLibrarySelection', 'CheckUpdate'): return data = json.loads(data)[0] @@ -326,6 +326,10 @@ class Service(xbmc.Monitor): if data.get('ServerId') is None: Views().get_views() + elif method == 'CheckUpdate': + if not self.check_update(): + dialog("notification", heading="{emby}", message=_(21341), icon="{emby}", sound=False) + def onSettingsChanged(self): ''' React to setting changes that impact window values. diff --git a/resources/settings.xml b/resources/settings.xml index e6e294ea..aaa810ce 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -86,6 +86,7 @@ +