1 from Plugins.Plugin import PluginDescriptor
2 from Tools.HardwareInfo import HardwareInfo
3 from Tools.Directories import fileExists
4 from downloader import NFIDownload, filescan
6 def NFIFlasherMain(session, tmp = None, **kwargs):
7 session.open(NFIDownload, "/home/root" )
9 def NFICallFnc(tmp = None):
12 def Plugins(**kwargs):
13 # currently only available for DM8000
14 if HardwareInfo().get_device_name() != "dm8000":
15 return [PluginDescriptor()]
16 if fileExists("/usr/share/bootlogo-flasher.mvi"):
18 # 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
19 return [PluginDescriptor(where = PluginDescriptor.WHERE_WIZARD, fnc = (9,flasher.NFIFlash))]
21 # started on real enigma2
22 return [PluginDescriptor(name=_("NFI Image Flashing"),
23 description=_("Download .NFI-Files for USB-Flasher"),
25 where = PluginDescriptor.WHERE_SOFTWAREMANAGER,
26 fnc={"SoftwareSupported": NFICallFnc, "menuEntryName": lambda x: _("NFI Image Flashing"),
27 "menuEntryDescription": lambda x: _("Download .NFI-Files for USB-Flasher")}),
28 PluginDescriptor(name="nfi", where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan)]