X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/5bc8209d19e1d41f289cfe198e4e3a839adf894b..54e5f0d7d4e983b448b9cf387ed62291595cc5a5:/lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py diff --git a/lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py b/lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py index 1946edf0..38b80c95 100644 --- a/lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py +++ b/lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py @@ -12,7 +12,7 @@ def getUpgradeVersion(): if r[:16] != "FP update tool v": return None else: - return int(r[16:]) + return int(r[16:17]) class FPUpgrade(Screen): skin = """ @@ -47,11 +47,41 @@ class FPUpgrade(Screen): def ok(self): self.close(4) +class SystemMessage(Screen): + skin = """ + + + + """ + def __init__(self, session, message): + from Components.Sources.StaticText import StaticText + + Screen.__init__(self, session) + + self["text"] = StaticText(message) + + self["actions"] = ActionMap(["OkCancelActions"], + { + "cancel": self.ok, + }) + + def ok(self): + self.close() + def Plugins(**kwargs): from Tools.DreamboxHardware import getFPVersion + from Screens.MessageBox import MessageBox + version = getFPVersion() newversion = getUpgradeVersion() or 0 + list = [] if version is not None and version < newversion: - return PluginDescriptor(name="FP Upgrade", where = PluginDescriptor.WHERE_WIZARD, fnc=(8, FPUpgrade)) - else: - return [ ] + list.append(PluginDescriptor(name="FP Upgrade", where = PluginDescriptor.WHERE_WIZARD, fnc=(8, FPUpgrade))) + + try: + msg = open("/proc/stb/message").read() + list.append(PluginDescriptor(name="System Message Check", where = PluginDescriptor.WHERE_WIZARD, fnc=(9, SystemMessage, msg))) + except: + pass + + return list