diff options
| author | acid-burn <acid-burn@opendreambox.org> | 2009-12-23 06:57:25 +0100 |
|---|---|---|
| committer | acid-burn <acid-burn@opendreambox.org> | 2009-12-23 06:57:25 +0100 |
| commit | 4e6cd91094c4491134f5d8f81b03282fb50f7f09 (patch) | |
| tree | 015a67f42dcf0e52792bb580959709b05016838c /lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py | |
| parent | ca13d7906607bb7be40e7695e36054b8b86c8529 (diff) | |
| parent | 3e4556706ac4c42b68594be8477fb204cd5ff0e9 (diff) | |
| download | enigma2-4e6cd91094c4491134f5d8f81b03282fb50f7f09.tar.gz enigma2-4e6cd91094c4491134f5d8f81b03282fb50f7f09.zip | |
Merge branch 'bug_308_add_where_softwaremanager'
Conflicts:
lib/python/Plugins/Plugin.py
Diffstat (limited to 'lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py')
| -rwxr-xr-x[-rw-r--r--] | lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py b/lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py index 40914e12..28b33305 100644..100755 --- a/lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py +++ b/lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py @@ -1,20 +1,28 @@ +from Plugins.Plugin import PluginDescriptor +from Tools.HardwareInfo import HardwareInfo +from Tools.Directories import fileExists +from downloader import NFIDownload, filescan + +def NFIFlasherMain(session, tmp = None, **kwargs): + session.open(NFIDownload, "/home/root" ) + +def NFICallFnc(tmp = None): + return NFIFlasherMain + def Plugins(**kwargs): - from Plugins.Plugin import PluginDescriptor - from Tools.HardwareInfo import HardwareInfo # currently only available for DM8000 if HardwareInfo().get_device_name() != "dm8000": return [PluginDescriptor()] - from Tools.Directories import fileExists if fileExists("/usr/share/bootlogo-flasher.mvi"): import flasher # started from usb stick # don't try to be intelligent and trick this - it's not possible to rewrite the flash memory with a system currently booted from it return [PluginDescriptor(where = PluginDescriptor.WHERE_WIZARD, fnc = (9,flasher.NFIFlash))] else: # started on real enigma2 - import downloader - return [PluginDescriptor(name="NFI Image Flashing", - description = _("Download .NFI-Files for USB-Flasher"), + return [PluginDescriptor(name=_("NFI Image Flashing"), + description=_("Download .NFI-Files for USB-Flasher"), icon = "flash.png", - where = [PluginDescriptor.WHERE_PLUGINMENU], - fnc = downloader.main), PluginDescriptor(name="nfi", where = PluginDescriptor.WHERE_FILESCAN, fnc = downloader.filescan) - ] + where = PluginDescriptor.WHERE_SOFTWAREMANAGER, + fnc={"SoftwareSupported": NFICallFnc, "menuEntryName": lambda x: _("NFI Image Flashing"), + "menuEntryDescription": lambda x: _("Download .NFI-Files for USB-Flasher")}), + PluginDescriptor(name="nfi", where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan)] |
