예제 #1
0
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)]
예제 #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
예제 #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)
예제 #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,
		)
	),
예제 #5
0
def Plugins(**kwargs):
    return PluginDescriptor(name="Skinselector",
                            description="Select Your Skin",
                            where=PluginDescriptor.WHERE_MENU,
                            needsRestart=False,
                            fnc=SkinSelSetup)
예제 #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)]
예제 #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)]
예제 #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
예제 #9
0
def Plugins(**kwargs):
    return PluginDescriptor(
        name=_("StreamTVPlayer"),
        description="Watching IPTV implemented by RTSP/RTMP protocol.",
        where=PluginDescriptor.WHERE_PLUGINMENU,
        fnc=main)
예제 #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)
예제 #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)
예제 #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)]
예제 #13
0
파일: plugin.py 프로젝트: Akki01/dvbapp
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)]
예제 #14
0
파일: plugin.py 프로젝트: fogoegami/454549
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
예제 #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
예제 #16
0
def Plugins(**kwargs):
	return [PluginDescriptor(name="Sudoku", description=_("Sudoku Game"), where = [PluginDescriptor.WHERE_PLUGINMENU], fnc=main)]
예제 #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)
예제 #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!'
예제 #19
0
def Plugins(**kwargs):
	return [PluginDescriptor(where = PluginDescriptor.WHERE_SESSIONSTART, fnc = SIBautostart)]
예제 #20
0
def Plugins(**kwargs):
    return PluginDescriptor(name="MovieCut",
                            description=_("Execute cuts..."),
                            where=PluginDescriptor.WHERE_MOVIELIST,
                            fnc=main)
예제 #21
0
파일: plugin.py 프로젝트: vuteam/dvbapp
def Plugins(**kwargs):
	return [PluginDescriptor(name=_("RemoteControlCode"), description="setup Remote Control System Code Type", where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = True, fnc=main)]
예제 #22
0
def Plugins(**kwargs):
	list = [PluginDescriptor(name="BitrateViewer", description=_("BitrateViewer"), 
		where = [PluginDescriptor.WHERE_EXTENSIONSMENU ], fnc=main)]
	return list
예제 #23
0
def Plugins(**kwargs):
	return PluginDescriptor(name=_("Podcast"), where=PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=main)
예제 #24
0
def Plugins(**kwargs):            
	return PluginDescriptor(name=_("Blindscan"), description=_("scan type(DVB-S)"), where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main)
예제 #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) ]
예제 #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)]
예제 #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:
예제 #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)]
예제 #29
0
def Plugins(**kwargs):
    return PluginDescriptor(name=pname,
                            description=pdesc,
                            where=PluginDescriptor.WHERE_PLUGINMENU,
                            icon="plugin.png",
                            fnc=main)
예제 #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)]
예제 #31
0
def Plugins(**kwargs):            
	return PluginDescriptor(name=_("FPGA Upgrade"), description=_("Upgrade FPGA.."), where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main)
예제 #32
0
def Plugins(**kwargs):
    return PluginDescriptor(name="TuxTXT",
                            description="Videotext",
                            where=PluginDescriptor.WHERE_TELETEXT,
                            fnc=main)
예제 #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)