1 from Plugins.Plugin import PluginDescriptor
2 from Tools.HardwareInfo import HardwareInfo
3 from Tools.Directories import fileExists
4 from downloader import NFIDownload, filescan
5 from flasher import NFIFlash
7 def NFIFlasherMain(session, tmp = None, **kwargs):
8 session.open(NFIDownload, "/home/root" )
10 def NFICallFnc(tmp = None):
13 def Plugins(**kwargs):
14 # currently only available for DM8000
15 if HardwareInfo().get_device_name() != "dm8000":
16 return [PluginDescriptor()]
17 #return [PluginDescriptor(where = PluginDescriptor.WHERE_WIZARD, fnc = (9,NFIFlash))]
18 # it's not possible to rewrite the flash memory with a system currently booted from it
19 return [PluginDescriptor(name=_("NFI Image Flashing"),
20 description=_("Download .NFI-Files for USB-Flasher"),
22 where = PluginDescriptor.WHERE_SOFTWAREMANAGER,
23 fnc={"SoftwareSupported": NFICallFnc, "menuEntryName": lambda x: _("NFI Image Flashing"),
24 "menuEntryDescription": lambda x: _("Download .NFI-Files for USB-Flasher")}),
25 PluginDescriptor(name="nfi", where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan)]