def Plugins(**kwargs):
	p = PluginDescriptor(where=[PluginDescriptor.WHERE_SESSIONSTART], fnc=sessionstart)
	p.weight = 100 #webif should start as last plugin
	return [p,
#			PluginDescriptor(where=[PluginDescriptor.WHERE_NETWORKCONFIG_READ], fnc=networkstart),
			PluginDescriptor(name=_("Webinterface"), description=_("Configuration for the Webinterface"),
							where=[PluginDescriptor.WHERE_PLUGINMENU], icon="plugin.png", fnc=openconfig)]
Example #2
0
def Plugins(**kwargs):
    p = PluginDescriptor(where=[PluginDescriptor.WHERE_SESSIONSTART], fnc=sessionstart)
    p.weight = 100  # webif should start as last plugin
    list = [
        p,
        # 			PluginDescriptor(where=[PluginDescriptor.WHERE_NETWORKCONFIG_READ], fnc=networkstart),
        PluginDescriptor(
            name=_("Webinterface"),
            description=_("Configuration for the Webinterface"),
            where=[PluginDescriptor.WHERE_PLUGINMENU],
            icon="plugin.png",
            fnc=openconfig,
        ),
    ]
    if config.plugins.Webinterface.show_in_extensionsmenu.value:
        list.append(
            PluginDescriptor(
                name="Webinterface",
                description=_("Configuration for the Webinterface"),
                where=PluginDescriptor.WHERE_EXTENSIONSMENU,
                icon="plugin.png",
                fnc=openconfig,
            )
        )
    return list
Example #3
0
def PluginComponent_addPlugin(self, plugin, *args, **kwargs):
	if len(plugin.where) > 1:
		print("[PluginSort] Splitting %s up in individual entries (%s)" % (plugin.name, repr(plugin.where)))
		for x in plugin.where:
			pd = PluginDescriptor(name=plugin.name, where=[x], description=plugin.description, icon=plugin.icon, fnc=plugin.__call__, wakeupfnc=plugin.wakeupfnc, needsRestart=plugin.needsRestart, internal=plugin.internal, weight=plugin.weight)

			newWeight = pluginWeights.get(pd)
			if DEBUG: print("[PluginSort] Setting weight of %s from %d to %d" % (pd.name, pd.weight, newWeight))
			pd.weight = newWeight
			PluginComponent.pluginSort_baseAddPlugin(self, pd, *args, **kwargs)

		# installedPluginList is a list of original descriptors, but we changed it to be a copy, not a reference. so keep it up to date
		if self.firstRun:
			self.installedPluginList.append(plugin)
			if DEBUG: print("[PluginSort] Adding %s to list of installed plugins (%s, %s)." % (plugin.name, plugin.path, repr(plugin.where)))
		return

	newWeight = pluginWeights.get(plugin)
	if DEBUG: print("[PluginSort] Setting weight of %s from %d to %d" % (plugin.name, plugin.weight, newWeight))
	plugin.weight = newWeight
	PluginComponent.pluginSort_baseAddPlugin(self, plugin, *args, **kwargs)

	if self.firstRun:
		if DEBUG: print("[PluginSort] Adding %s to list of installed plugins (%s, %s)." % (plugin.name, plugin.path, repr(plugin.where)))
		self.installedPluginList.append(plugin)
Example #4
0
	info = serviceHandler.info(service)
	eventName = info and info.getName(service) or ''
	(root, ext) = os.path.splitext(eventName)
	if ext in KNOWN_EXTENSIONS:
		print"#####################", ext
		eventName = re.sub("[\W_]+", ' ', root.decode("utf8"), 0, re.LOCALE | re.UNICODE).encode("utf8")
	session.open(IMDB, eventName)


pluginlist = (
	(
		config.plugins.imdb.showinplugins,
		PluginDescriptor(
			name=_("IMDb search"),
			description=_("Search for details from the Internet Movie Database"),
			icon="imdb.png",
			where=PluginDescriptor.WHERE_PLUGINMENU,
			fnc=main,
			needsRestart=False,
		)
	),
	(
		config.plugins.imdb.showsetupinplugins,
		PluginDescriptor(
			name=_("IMDb setup"),
			description=_("Settings for Internet Movie Database searches"),
			icon="imdb.png",
			where=PluginDescriptor.WHERE_PLUGINMENU,
			fnc=setup,
			needsRestart=False,
		)
	),
Example #5
0
def Plugins(**kwargs):
    return PluginDescriptor(name="Skinselector",
                            description="Select Your Skin",
                            where=PluginDescriptor.WHERE_MENU,
                            needsRestart=False,
                            fnc=SkinSelSetup)
Example #6
0
def Plugins(**kwargs):
	return [PluginDescriptor(name=_("DVD Backup"), description=_("Backup your Video-DVD to your harddisk"), where=PluginDescriptor.WHERE_PLUGINMENU, icon="DVDBackup.png", fnc=main),
		PluginDescriptor(where=PluginDescriptor.WHERE_FILESCAN, fnc=filescan)]
Example #7
0
def Plugins(**kwargs):
    return [PluginDescriptor(name='Boblight Enigma2', description=_('Ambilight clone'), where=PluginDescriptor.WHERE_PLUGINMENU, icon='boblight.png', fnc=startSetup),
    PluginDescriptor(name='Boblight | On / Off', description=_('Ambilight clone'), where=PluginDescriptor.WHERE_EXTENSIONSMENU, icon='boblight.png', fnc=DaemonToggle),
    PluginDescriptor(name='Boblight Menu', description=_('Ambilight clone'), where=PluginDescriptor.WHERE_EXTENSIONSMENU, icon='boblight.png', fnc=startSetup)]
Example #8
0
def Plugins(**kwargs):
	pList = []
	if nimmanager.hasNimType("DVB-T"):
		pList.append(PluginDescriptor(name=_("Terrestrial Scan"), description="For scanning terrestrial tv", where=PluginDescriptor.WHERE_MENU, needsRestart=False, fnc=TerrestrialScanStart))
	return pList
Example #9
0
def Plugins(**kwargs):
    return PluginDescriptor(
        name=_("StreamTVPlayer"),
        description="Watching IPTV implemented by RTSP/RTMP protocol.",
        where=PluginDescriptor.WHERE_PLUGINMENU,
        fnc=main)
Example #10
0
def Plugins(**kwargs):
	if any([nimmanager.hasNimType(x) for x in "DVB-S", "DVB-T", "DVB-C", "ATSC"]):
		return PluginDescriptor(name=_("Satfinder"), description=_("Helps setting up your antenna"), where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=SatfinderStart)
Example #11
0
def Plugins(**kwargs):
	return PluginDescriptor(
		name=title,
		description=_("Change or reset the root password of your Receiver"),
		where=[PluginDescriptor.WHERE_MENU], fnc=startChange)
Example #12
0
def Plugins(**kwargs):
	return [PluginDescriptor(name=_("Zap Statistic"), description=_("Shows the watched services with some statistic"), where=PluginDescriptor.WHERE_PLUGINMENU, fnc=main),
		PluginDescriptor(where=PluginDescriptor.WHERE_SESSIONSTART, fnc=sessionstart),
		PluginDescriptor(where=PluginDescriptor.WHERE_AUTOSTART, fnc=autostart)]
Example #13
0
def Plugins(**kwargs):
	return [PluginDescriptor(where = PluginDescriptor.WHERE_SESSIONSTART, needsRestart = False, fnc=sessionstart),
		PluginDescriptor(name=_("Web Browser"), description="start web browser", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main)]
Example #14
0
def Plugins(**kwargs):
	list = []
	if config.usage.setup_level.index >= 2 and os.path.exists("/proc/stb/vmpeg/0/pep_apply"):
		list.append(PluginDescriptor(name=_("Video enhancement setup"), description=_("Advanced video enhancement setup"), where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=startSetup))
	return list
Example #15
0
def Plugins(**kwargs):
	list = [PluginDescriptor(name=_("Weather Plugin"), description=_("Show Weather Forecast"), where=[PluginDescriptor.WHERE_PLUGINMENU, PluginDescriptor.WHERE_EXTENSIONSMENU], icon="weather.png", fnc=main)]
	return list
Example #16
0
def Plugins(**kwargs):
	return [PluginDescriptor(name="Sudoku", description=_("Sudoku Game"), where = [PluginDescriptor.WHERE_PLUGINMENU], fnc=main)]
Example #17
0
def Plugins(path, **kwargs):
	global pluginpath
	pluginpath = path
	return PluginDescriptor(name="MeteoItalia", description="Previsioni Meteo", icon="meteoitalia.png", where=PluginDescriptor.WHERE_PLUGINMENU, fnc=main)
Example #18
0
                             title=_('Please choose he package...'),
                             list=filelist)


def filescan(**kwargs):
    from Components.Scanner import Scanner, ScanPath
    return Scanner(mimetypes=['application/x-dream-package'],
                   paths_to_scan=[
                       ScanPath(path='dmpkg', with_subdirs=True),
                       ScanPath(path='', with_subdirs=False)
                   ],
                   name='Dream-Package',
                   description=_('Install settings, skins, software...'),
                   openfnc=filescan_open)


print 'add dreampackage scanner plugin'
plugins.addPlugin(
    PluginDescriptor(name='Dream-Package',
                     where=PluginDescriptor.WHERE_FILESCAN,
                     fnc=filescan,
                     internal=True))
print 'added'
wizardManager.registerWizard(DefaultWizard,
                             config.misc.defaultchosen.value,
                             priority=6)
if config.misc.defaultchosen.value:
    print 'Installing image defaults'
    installer = ImageDefaultInstaller()
    print 'installing done!'
Example #19
0
def Plugins(**kwargs):
	return [PluginDescriptor(where = PluginDescriptor.WHERE_SESSIONSTART, fnc = SIBautostart)]
Example #20
0
def Plugins(**kwargs):
    return PluginDescriptor(name="MovieCut",
                            description=_("Execute cuts..."),
                            where=PluginDescriptor.WHERE_MOVIELIST,
                            fnc=main)
Example #21
0
def Plugins(**kwargs):
	return [PluginDescriptor(name=_("RemoteControlCode"), description="setup Remote Control System Code Type", where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = True, fnc=main)]
def Plugins(**kwargs):
	list = [PluginDescriptor(name="BitrateViewer", description=_("BitrateViewer"), 
		where = [PluginDescriptor.WHERE_EXTENSIONSMENU ], fnc=main)]
	return list
Example #23
0
def Plugins(**kwargs):
	return PluginDescriptor(name=_("Podcast"), where=PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=main)
Example #24
0
def Plugins(**kwargs):            
	return PluginDescriptor(name=_("Blindscan"), description=_("scan type(DVB-S)"), where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main)
Example #25
0
def Plugins(**kwargs):
	return [PluginDescriptor(where = [PluginDescriptor.WHERE_SESSIONSTART], fnc = autostart), PluginDescriptor(where = [PluginDescriptor.WHERE_AUTOSTART], fnc = autoend), PluginDescriptor(name="Automatic Volume Adjustment", description=_("Automatic Volume Adjustment"), where = PluginDescriptor.WHERE_MENU, fnc=startSetup) ]
Example #26
0
def Plugins(**kwargs):
	return [PluginDescriptor(where=[PluginDescriptor.WHERE_AUTOSTART, PluginDescriptor.WHERE_SESSIONSTART], fnc=sessionstart),
		PluginDescriptor(name="LED_Giga", description="Change LED display settings", where=PluginDescriptor.WHERE_MENU, fnc=main)]
Example #27
0
		doLog("[AutoTimer] Unable to add Recordtitle to FilterList:", e)


def housekeepingExtensionsmenu(el):
	if el.value:
		plugins.addPlugin(extDescriptor)
		plugins.addPlugin(extDescriptor_scan)
	else:
		try:
			plugins.removePlugin(extDescriptor)
			plugins.removePlugin(extDescriptor_scan)
		except ValueError as ve:
			doLog("[AutoTimer] housekeepingExtensionsmenu got confused, tried to remove non-existant plugin entry... ignoring.")

config.plugins.autotimer.show_in_extensionsmenu.addNotifier(housekeepingExtensionsmenu, initial_call = False, immediate_feedback = True)
extDescriptor = PluginDescriptor(name="AutoTimer", description = _("Edit Timers and scan for new Events"), where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc = extensionsmenu, needsRestart = False)
extDescriptor_scan = PluginDescriptor(name="AutoTimer scan", description = _("scan for new Events"), where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc = extensionsmenu_scan, needsRestart = False)

def Plugins(**kwargs):
	l = [
		PluginDescriptor(where=PluginDescriptor.WHERE_AUTOSTART, fnc=autostart, needsRestart=False),
		PluginDescriptor(where=PluginDescriptor.WHERE_SESSIONSTART, fnc=sessionstart, needsRestart=False),
		# TRANSLATORS: description of AutoTimer in PluginBrowser
		PluginDescriptor(name="AutoTimer", description = _("Edit Timers and scan for new Events"), where = PluginDescriptor.WHERE_PLUGINMENU, icon = "plugin.png", fnc = main, needsRestart = False),
		# TRANSLATORS: AutoTimer title in MovieList (automatically opens importer, I consider this no further interaction)
		PluginDescriptor(name="AutoTimer", description= _("add AutoTimer"), where = PluginDescriptor.WHERE_MOVIELIST, fnc = movielist, needsRestart = False),
		# TRANSLATORS: AutoTimer title in EventInfo dialog (requires the user to select an event to base the AutoTimer on)
		PluginDescriptor(name = _("add AutoTimer..."), where = PluginDescriptor.WHERE_EVENTINFO, fnc = eventinfo, needsRestart = False),
		PluginDescriptor(name = _("add to AutoTimer filterList"), description = _("add to AutoTimer filterList"), where = PluginDescriptor.WHERE_MOVIELIST, fnc = add_to_filterList, needsRestart = False),
	]
	if config.plugins.autotimer.show_in_extensionsmenu.value:
Example #28
0
def Plugins(**kwargs):
	return [PluginDescriptor(name=_("TV3 Play"),
		description=_("Watch TV3 play online services"),
		where=[PluginDescriptor.WHERE_PLUGINMENU,
		PluginDescriptor.WHERE_EXTENSIONSMENU],
		icon="picon.png", fnc=main)]
Example #29
0
def Plugins(**kwargs):
    return PluginDescriptor(name=pname,
                            description=pdesc,
                            where=PluginDescriptor.WHERE_PLUGINMENU,
                            icon="plugin.png",
                            fnc=main)
Example #30
0
def Plugins(**kwargs):
	return [
		PluginDescriptor(where=[PluginDescriptor.WHERE_SESSIONSTART], fnc=sessionstart),
		PluginDescriptor(name=_("Movielist Preview"), description=_("Movielist Preview"), where=PluginDescriptor.WHERE_MOVIELIST, fnc=main)]
Example #31
0
def Plugins(**kwargs):            
	return PluginDescriptor(name=_("FPGA Upgrade"), description=_("Upgrade FPGA.."), where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main)
Example #32
0
def Plugins(**kwargs):
    return PluginDescriptor(name="TuxTXT",
                            description="Videotext",
                            where=PluginDescriptor.WHERE_TELETEXT,
                            fnc=main)
Example #33
0
    def updateList(self):
        list = []
        expandableIcon = LoadPixmap(
            resolveFilename(SCOPE_CURRENT_SKIN,
                            "skin_default/expandable-plugins.png"))
        expandedIcon = LoadPixmap(
            resolveFilename(SCOPE_CURRENT_SKIN,
                            "skin_default/expanded-plugins.png"))
        verticallineIcon = LoadPixmap(
            resolveFilename(SCOPE_CURRENT_SKIN,
                            "skin_default/verticalline-plugins.png"))

        self.plugins = {}

        if self.type == self.UPDATE:
            self.list = list
            self["list"].l.setList(list)
            return

        for x in self.pluginlist:
            split = x[3].split('-', 1)
            if x[0][0:14] == 'kernel-module-':
                split[0] = "kernel modules"
            elif x[0][0:15] == 'enigma2-locale-':
                split[0] = "languages"

            if split[0] not in self.plugins:
                self.plugins[split[0]] = []

            if split[0] == "kernel modules":
                self.plugins[split[0]].append(
                    (PluginDescriptor(name=x[0],
                                      description=x[2],
                                      icon=verticallineIcon), x[0][14:], x[1]))
            elif split[0] == "languages":
                for t in self.LanguageList:
                    if len(x[2]) > 2:
                        tmpT = t[0].lower()
                        tmpT = tmpT.replace('_', '-')
                        if tmpT == x[2]:
                            countryIcon = LoadPixmap(
                                resolveFilename(SCOPE_CURRENT_SKIN,
                                                "countries/" + t[0] + ".png"))
                            if countryIcon is None:
                                countryIcon = LoadPixmap(
                                    resolveFilename(SCOPE_CURRENT_SKIN,
                                                    "countries/missing.png"))
                            self.plugins[split[0]].append(
                                (PluginDescriptor(name=x[0],
                                                  description=x[2],
                                                  icon=countryIcon), t[1],
                                 x[1]))
                            break
                    else:
                        if t[0][:2] == x[2] and t[0][3:] != 'GB':
                            countryIcon = LoadPixmap(
                                resolveFilename(SCOPE_CURRENT_SKIN,
                                                "countries/" + t[0] + ".png"))
                            if countryIcon is None:
                                countryIcon = LoadPixmap(
                                    resolveFilename(SCOPE_CURRENT_SKIN,
                                                    "countries/missing.png"))
                            self.plugins[split[0]].append(
                                (PluginDescriptor(name=x[0],
                                                  description=x[2],
                                                  icon=countryIcon), t[1],
                                 x[1]))
                            break
            else:
                if len(split) < 2:
                    continue
                self.plugins[split[0]].append(
                    (PluginDescriptor(name=x[3],
                                      description=x[2],
                                      icon=verticallineIcon), split[1], x[1]))

        temp = self.plugins.keys()
        if config.usage.sort_pluginlist.getValue():
            temp.sort()
        for x in temp:
            if x in self.expanded:
                list.append(
                    PluginCategoryComponent(x, expandedIcon, self.listWidth))
                for plugin in self.plugins[x]:
                    if self.type == self.TOOGLE or self.type == self.REMOVE:
                        if "hold" in os.popen("opkg status " +
                                              self.PLUGIN_PREFIX + "*" +
                                              plugin[1]).read():
                            list.extend([
                                PluginDownloadComponent(
                                    plugin[0], plugin[1] + ' holded',
                                    plugin[2], self.listWidth)
                            ])
                        else:
                            list.extend([
                                PluginDownloadComponent(
                                    plugin[0], plugin[1], plugin[2],
                                    self.listWidth)
                            ])
                    else:
                        list.extend([
                            PluginDownloadComponent(plugin[0], plugin[1],
                                                    plugin[2], self.listWidth)
                        ])

            else:
                list.append(
                    PluginCategoryComponent(x, expandableIcon, self.listWidth))
        self.list = list
        self["list"].l.setList(list)