diff --git a/resources/language/resource.language.en_gb/strings.po b/resources/language/resource.language.en_gb/strings.po index 1da8bad..f2247c4 100644 --- a/resources/language/resource.language.en_gb/strings.po +++ b/resources/language/resource.language.en_gb/strings.po @@ -81,6 +81,14 @@ msgctxt "#33117" msgid "CEC on Android (kernel)" msgstr "CEC on Android (kernel)" +msgctxt "#33118" +msgid "CEC timeout on wakeup (seconds)" +msgstr "CEC timeout on wakeup (seconds)" + +msgctxt "#33119" +msgid "CEC - Display notification on delayed wakeup" +msgstr "CEC - Display notification on delayed wakeup" + msgctxt "#33200" msgid "Power" msgstr "Power" diff --git a/resources/settings.xml b/resources/settings.xml index a47beb6..885a623 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -3,6 +3,8 @@ + + diff --git a/screensaver.py b/screensaver.py index bf5c66d..aee2ea0 100644 --- a/screensaver.py +++ b/screensaver.py @@ -4,7 +4,7 @@ import xbmc import xbmcaddon import xbmcgui - +import time def log_error(msg='', level=xbmc.LOGERROR): xbmc.log(msg='[%s] %s' % (addon_name, msg), level=level) @@ -129,6 +129,10 @@ def exit(self): if display_method != 0: log_notice(msg='Turn display signal back on using method %s' % display_method) if display_method == '1': # CEC (built-in) + cec_timeout_number = int(cec_timeout) + if cec_timeout_message== 'true' and cec_timeout_number > 0: popup(msg="Cec activation delayed by %s s" % (cec_timeout_number),heading="Delayed activation") + time.sleep(cec_timeout_number) + if cec_timeout_message== 'true' and cec_timeout_number > 0: popup(msg="Cec activated",heading="Delayed activation") run_builtin('CECActivateSource') elif display_method == '2': # No Signal on Raspberry Pi (using vcgencmd) run_command(['vcgencmd', 'display_power', '1']) @@ -155,6 +159,8 @@ def exit(self): addon_path = addon.getAddonInfo('path') addon_icon = addon.getAddonInfo('icon') display_method = addon.getSetting('display_method') + cec_timeout = addon.getSetting('cec_timeout') + cec_timeout_message = addon.getSetting('cec_timeout_message') power_method = addon.getSetting('power_method') logoff = addon.getSetting('logoff') mute = addon.getSetting('mute')