move http progress downloader class into own tool py
[enigma2.git] / lib / python / Plugins / SystemPlugins / NFIFlash / plugin.py
1 def Plugins(**kwargs):
2         from Plugins.Plugin import PluginDescriptor
3         from Tools.HardwareInfo import HardwareInfo
4         # currently only available for DM8000
5         if HardwareInfo().get_device_name() != "dm8000":
6                 return [PluginDescriptor()]
7         from Tools.Directories import fileExists
8         if fileExists("/usr/share/bootlogo-flasher.mvi"):
9                 import flasher
10                 # 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
11                 return [PluginDescriptor(where = PluginDescriptor.WHERE_WIZARD, fnc = (9,flasher.NFIFlash))]
12         else:
13                 # started on real enigma2
14                 import downloader
15                 return [PluginDescriptor(name="NFI Image Flashing",
16                         description = _("Download .NFI-Files for USB-Flasher"),
17                         icon = "flash.png",
18                         where = [PluginDescriptor.WHERE_PLUGINMENU],
19                         fnc = downloader.main), PluginDescriptor(name="nfi", where = PluginDescriptor.WHERE_FILESCAN, fnc = downloader.filescan)
20                         ]