Example #1
0
    def prepareMainTemplate(self):
        # here will be generated the dictionary for the main template
        ret = getCollapsedMenus()
        ret["remotegrabscreenshot"] = getRemoteGrabScreenshot()["remotegrabscreenshot"]
        ret["configsections"] = getConfigsSections()["sections"]
        ret["zapstream"] = getZapStream()["zapstream"]
        ret["showname"] = getShowName()["showname"]
        ret["customname"] = getCustomName()["customname"]
        ret["boxname"] = getBoxName()["boxname"]
        if not ret["boxname"] or not ret["customname"]:
            ret["boxname"] = getInfo()["brand"] + " " + getInfo()["model"]
        ret["box"] = getBoxType()
        ret["remote"] = remote
        from Components.config import config

        if hasattr(eEPGCache, "FULL_DESCRIPTION_SEARCH"):
            ret["epgsearchcaps"] = True
        else:
            ret["epgsearchcaps"] = False
            if config.OpenWebif.webcache.epg_desc_search.value:
                config.OpenWebif.webcache.epg_desc_search.value = False
                config.OpenWebif.webcache.epg_desc_search.save()
        ret["epgsearchtype"] = getEPGSearchType()["epgsearchtype"]
        extras = []
        extras.append({"key": "ajax/settings", "description": _("Settings")})
        if fileExists(resolveFilename(SCOPE_PLUGINS, "Extensions/LCD4linux/WebSite.pyo")):
            lcd4linux_key = "lcd4linux/config"
            if fileExists(resolveFilename(SCOPE_PLUGINS, "Extensions/WebInterface/plugin.pyo")):
                from Components.Network import iNetwork

                ifaces = iNetwork.getConfiguredAdapters()
                if len(ifaces):
                    ip_list = iNetwork.getAdapterAttribute(ifaces[0], "ip")  # use only the first configured interface
                    ip = "%d.%d.%d.%d" % (ip_list[0], ip_list[1], ip_list[2], ip_list[3])
                try:
                    lcd4linux_port = "http://" + ip + ":" + str(config.plugins.Webinterface.http.port.value) + "/"
                    lcd4linux_key = lcd4linux_port + "lcd4linux/config"
                except KeyError:
                    lcd4linux_key = None
            if lcd4linux_key:
                extras.append({"key": lcd4linux_key, "description": _("LCD4Linux Setup")})

        try:
            from Plugins.Extensions.AutoTimer.AutoTimer import AutoTimer

            extras.append({"key": "ajax/at", "description": _("AutoTimer")})
        except ImportError:
            pass
        if fileExists(resolveFilename(SCOPE_PLUGINS, "Extensions/OpenWebif/controllers/views/ajax/bqe.tmpl")):
            extras.append({"key": "ajax/bqe", "description": _("BouquetEditor")})

        try:
            from Plugins.Extensions.EPGRefresh.EPGRefresh import epgrefresh

            extras.append({"key": "ajax/epgr", "description": _("EPGRefresh")})
        except ImportError:
            pass
        ret["extras"] = extras

        return ret
Example #2
0
	def prepareMainTemplate(self):
		# here will be generated the dictionary for the main template
		ret = getCollapsedMenus()
		ret['remotegrabscreenshot'] = getRemoteGrabScreenshot()['remotegrabscreenshot']
		ret['configsections'] = getConfigsSections()['sections']
		ret['zapstream'] = getZapStream()['zapstream']
		ret['showname'] = getShowName()['showname']
		ret['customname'] = getCustomName()['customname']
		ret['boxname'] = getBoxName()['boxname']
		if not ret['boxname'] or not ret['customname']:
			ret['boxname'] = getInfo()['brand']+" "+getInfo()['model']
		ret['box'] = getBoxType()
		ret["remote"] = remote

		extras = []
		extras.append({ 'key': 'ajax/settings','description': _("Settings")})
		if fileExists(resolveFilename(SCOPE_PLUGINS, "Extensions/LCD4linux/WebSite.pyo")):
			lcd4linux_key = "lcd4linux/config"
			if fileExists(resolveFilename(SCOPE_PLUGINS, "Extensions/WebInterface/plugin.pyo")):
				from Components.config import config
				from Components.Network import iNetwork
				ifaces = iNetwork.getConfiguredAdapters()
				if len(ifaces):
					ip_list = iNetwork.getAdapterAttribute(ifaces[0], "ip") # use only the first configured interface
					ip = "%d.%d.%d.%d" % (ip_list[0], ip_list[1], ip_list[2], ip_list[3])
				try:
					lcd4linux_port = "http://" + ip + ":" + str(config.plugins.Webinterface.http.port.value) + "/"
					lcd4linux_key = lcd4linux_port + 'lcd4linux/config'
				except KeyError:
					lcd4linux_key = None
			if lcd4linux_key:
				extras.append({ 'key': lcd4linux_key, 'description': _("LCD4Linux Setup")})
		
		try:
			from Plugins.Extensions.AutoTimer.AutoTimer import AutoTimer
			extras.append({ 'key': 'ajax/at','description': _('AutoTimer')})
		except ImportError:
			pass
		if fileExists(resolveFilename(SCOPE_PLUGINS, "Extensions/OpenWebif/controllers/views/ajax/bqe.tmpl")):
			extras.append({ 'key': 'ajax/bqe','description': _('BouquetEditor')})
		
		try:
			from Plugins.Extensions.EPGRefresh.EPGRefresh import epgrefresh
			extras.append({ 'key': 'ajax/epgr','description': _('EPGRefresh')})
		except ImportError:
			pass
		ret['extras'] = extras

		return ret
Example #3
0
	def prepareMainTemplate(self):
		from Components.Network import iNetwork
		ifaces = iNetwork.getConfiguredAdapters()
		if len(ifaces):
				ip_list = iNetwork.getAdapterAttribute(ifaces[0], "ip") # use only the first configured interface
				ip = "%d.%d.%d.%d" % (ip_list[0], ip_list[1], ip_list[2], ip_list[3])
			
		ret = getCollapsedMenus()
		ret['remotegrabscreenshot'] = getRemoteGrabScreenshot()['remotegrabscreenshot']
		ret['configsections'] = getConfigsSections()['sections']
		ret['zapstream'] = getZapStream()['zapstream']
		ret['showname'] = getShowName()['showname']
		ret['customname'] = getCustomName()['customname']
		ret['boxname'] = getBoxName()['boxname']
		if not ret['boxname'] or not ret['customname']:
			ret['boxname'] = getInfo()['brand']+" "+getInfo()['model']
		ret['box'] = getBoxType()
		ret["remote"] = remote
		from Components.config import config
		if hasattr(eEPGCache, 'FULL_DESCRIPTION_SEARCH'):
			ret['epgsearchcaps'] = True
		else:
			ret['epgsearchcaps'] = False
			if config.ModernWebif.webcache.epg_desc_search.value:
				config.ModernWebif.webcache.epg_desc_search.value = False
				config.ModernWebif.webcache.epg_desc_search.save()
		ret['epgsearchtype'] = getEPGSearchType()['epgsearchtype']
		extras = []
		extras.append({ 'key': 'ajax/settings','description': _("Settings")})
		if fileExists(resolveFilename(SCOPE_PLUGINS, "Extensions/LCD4linux/WebSite.pyo")):
			lcd4linux_key = "lcd4linux/config"
			if fileExists(resolveFilename(SCOPE_PLUGINS, "Extensions/WebInterface/plugin.pyo")):
				try:
					lcd4linux_port = "http://" + ip + ":" + str(config.plugins.Webinterface.http.port.value) + "/"
					lcd4linux_key = lcd4linux_port + 'lcd4linux/config'
				except KeyError:
					lcd4linux_key = None
			if lcd4linux_key:
				extras.append({ 'key': lcd4linux_key, 'description': _("LCD4Linux Setup")})
		
		if fileExists("/usr/keys/oscam_atv/oscam.conf"):
				oscam_atv_config = ConfigParser.ConfigParser()
				oscam_atv_config.readfp(open('/usr/keys/oscam_atv/oscam.conf'))
				oscam_port = oscam_atv_config.get("webif","httpport");
				oscam_link = "http://" + ip + ":" + oscam_port + "/"
				extras.append({ 'key': oscam_link, 'description': _("OSCam Webinterface")})
		
		try:
			from Plugins.Extensions.AutoTimer.AutoTimer import AutoTimer
			extras.append({ 'key': 'ajax/at','description': _('AutoTimer')})
		except ImportError:
			pass
		if fileExists(resolveFilename(SCOPE_PLUGINS, "Extensions/ModernWebif/controllers/views/ajax/bqe.tmpl")):
			extras.append({ 'key': 'ajax/bqe','description': _('BouquetEditor')})
		
		try:
			from Plugins.Extensions.EPGRefresh.EPGRefresh import epgrefresh
			extras.append({ 'key': 'ajax/epgr','description': _('EPGRefresh')})
		except ImportError:
			pass
		ret['extras'] = extras

		return ret
Example #4
0
	def prepareMainTemplate(self, request):
		# here will be generated the dictionary for the main template
		ret = getCollapsedMenus()
		ret['configsections'] = getConfigsSections()['sections']
		ret['showname'] = getShowName()['showname']
		ret['customname'] = getCustomName()['customname']
		ret['boxname'] = getBoxName()['boxname']
		if not ret['boxname'] or not ret['customname']:
			ret['boxname'] = getInfo()['brand'] + " " + getInfo()['model']
		ret['box'] = getBoxType()
		ret["remote"] = REMOTE
		if hasattr(eEPGCache, 'FULL_DESCRIPTION_SEARCH'):
			ret['epgsearchcaps'] = True
		else:
			ret['epgsearchcaps'] = False
		extras = [{'key': 'ajax/settings', 'description': _("Settings")}]
		ifaces = iNetwork.getConfiguredAdapters()
		if len(ifaces):
			ip_list = iNetwork.getAdapterAttribute(ifaces[0], "ip")  # use only the first configured interface
			ip = "%d.%d.%d.%d" % (ip_list[0], ip_list[1], ip_list[2], ip_list[3])

			if fileExists(resolveFilename(SCOPE_PLUGINS, "Extensions/LCD4linux/WebSite.pyo")):
				lcd4linux_key = "lcd4linux/config"
				if fileExists(resolveFilename(SCOPE_PLUGINS, "Extensions/WebInterface/plugin.pyo")):
					try:
						lcd4linux_port = "http://" + ip + ":" + str(config.plugins.Webinterface.http.port.value) + "/"
						lcd4linux_key = lcd4linux_port + 'lcd4linux/config'
					except:  # noqa: E722
						lcd4linux_key = None
				if lcd4linux_key:
					extras.append({'key': lcd4linux_key, 'description': _("LCD4Linux Setup"), 'nw': '1'})

		self.oscamconf = self.oscamconfPath()
		if self.oscamconf is not None:
			data = open(self.oscamconf, "r").readlines()
			proto = "http"
			port = None
			for i in data:
				if "httpport" in i.lower():
					port = i.split("=")[1].strip()
					if port[0] == '+':
						proto = "https"
						port = port[1:]
			if port is not None:
				url = "%s://%s:%s" % (proto, request.getRequestHostname(), port)
				extras.append({'key': url, 'description': _("OSCam Webinterface"), 'nw': '1'})

		try:
			from Plugins.Extensions.AutoTimer.AutoTimer import AutoTimer  # noqa: F401
			extras.append({'key': 'ajax/at', 'description': _('AutoTimer')})
		except ImportError:
			pass

		if fileExists(resolveFilename(SCOPE_PLUGINS, "Extensions/OpenWebif/controllers/views/ajax/bqe.tmpl")) or fileExists(resolveFilename(SCOPE_PLUGINS, "Extensions/OpenWebif/controllers/views/ajax/bqe.pyo")):
			extras.append({'key': 'ajax/bqe', 'description': _('BouquetEditor')})

		try:
			from Plugins.Extensions.EPGRefresh.EPGRefresh import epgrefresh  # noqa: F401
			extras.append({'key': 'ajax/epgr', 'description': _('EPGRefresh')})
		except ImportError:
			pass

		try:
			# this will currenly only works if NO Webiterface plugin installed
			# TODO: test if webinterface AND openwebif installed
			from Plugins.Extensions.WebInterface.WebChilds.Toplevel import loaded_plugins
			for plugins in loaded_plugins:
				if plugins[0] in ["fancontrol", "iptvplayer"]:
					try:
						extras.append({'key': plugins[0], 'description': plugins[2], 'nw': '2'})
					except KeyError:
						pass
		except ImportError:
			pass

		if os.path.exists('/usr/bin/shellinaboxd') and (fileExists(resolveFilename(SCOPE_PLUGINS, "Extensions/OpenWebif/controllers/views/ajax/terminal.tmpl")) or fileExists(resolveFilename(SCOPE_PLUGINS, "Extensions/OpenWebif/controllers/views/ajax/terminal.pyo"))):
			extras.append({'key': 'ajax/terminal', 'description': _('Terminal')})

		ret['extras'] = extras
		theme = 'original'
		if config.OpenWebif.webcache.theme.value:
			theme = config.OpenWebif.webcache.theme.value
		if not os.path.exists(getPublicPath('themes')):
			if not (theme == 'original' or theme == 'clear'):
				theme = 'original'
				config.OpenWebif.webcache.theme.value = theme
				config.OpenWebif.webcache.theme.save()
		ret['theme'] = theme
		ret['webtv'] = os.path.exists(getPublicPath('webtv'))
		return ret
Example #5
0
	def prepareMainTemplate(self):
		# here will be generated the dictionary for the main template
		ret = getCollapsedMenus()
		ret['remotegrabscreenshot'] = getRemoteGrabScreenshot()['remotegrabscreenshot']
		ret['configsections'] = getConfigsSections()['sections']
		ret['zapstream'] = getZapStream()['zapstream']
		ret['showname'] = getShowName()['showname']
		ret['customname'] = getCustomName()['customname']
		ret['boxname'] = getBoxName()['boxname']
		if not ret['boxname'] or not ret['customname']:
			ret['boxname'] = getInfo()['brand']+" "+getInfo()['model']
		ret['box'] = "dmm"
#		if open("/proc/stb/info/model",'r').read().strip().lower() == "gigablue":
#			ret['box'] = "gigablue"
		if fileExists("/etc/.box"):
			ret['box'] = open("/etc/.box").read().strip().lower()
		elif fileExists("/proc/stb/info/boxtype"):
			ret['box'] = open("/proc/stb/info/boxtype").read().strip().lower()
		elif fileExists("/proc/stb/info/vumodel"):
			ret['box'] = open("/proc/stb/info/vumodel").read().strip().lower()
		elif fileExists("/proc/stb/info/azmodel"):
			ret['box'] = open("/proc/stb/info/azmodel").read().strip().lower()
		elif fileExists("/proc/stb/info/model"):
			ret['box'] = open("/proc/stb/info/model").read().strip().lower()

		if ret["box"] in ("vusolo", "vuduo", "vuuno", "vusolo2", "vuduo2", "vusolose", "vuzero", "solo", "duo", "uno", "solo2", "duo2", "solose", "zero"):
			ret["remote"] = "vu_normal"
		elif ret["box"] in ("vuultimo", "ultimo"):
			ret["remote"] = "vu_ultimo"
		elif ret["box"] == "e3hd":
			ret["remote"] = "e3hd"
		elif ret["box"] in ("et9x00", "et9000", "et9200", "et9500"):
			ret["remote"] = "et9x00"
		elif ret["box"] in ("et5x00", "et5000", "et6x00", "et6000"):
			ret["remote"] = "et5x00"
		elif ret["box"] in ("et4x00", "et4000"):
			ret["remote"] = "et4x00"
		elif ret["box"] == "gbquad":
			ret["remote"] = "gigablue"
		elif ret["box"] == "gbquadplus":
			ret["remote"] = "gbquadplus"
		elif ret["box"] == "et6500":
			ret["remote"] = "et6500"
		elif ret["box"] in ("et8x00", "et8000", "et1x000", "et10000"):
			ret["remote"] = "et8000"
		elif ret["box"] in ("formuler1", "formuler3"):
			ret["remote"] = "formuler1"
		elif ret["box"] in ("azboxme", "azboxminime", "me", "minime"):
			ret["remote"] = "me"
		elif ret["box"] in ("optimussos1", "optimussos1plus", "optimussos2", "optimussos2plus"):
			ret["remote"] = "optimuss"
		elif ret["box"] in ("premium", "premium+"):
			ret["remote"] = "premium"
		elif ret["box"] in ("elite", "ultra"):
			ret["remote"] = "elite"
		elif ret["box"] in ("ini-1000", "ini-1000ru"):
			ret["remote"] = "ini-1000"
		elif ret["box"] in ("ini-1000sv", "ini-5000sv", "ini-9000de"):
			ret["remote"] = "miraclebox"
		elif ret["box"] == "ini-3000":
			ret["remote"] = "ini-3000"
		elif ret["box"] in ("ini-7012", "ini-7000", "ini-5000", "ini-5000ru"):
			ret["remote"] = "ini-7000"
		elif ret["box"].startswith("spark"):
			ret["remote"] = "spark"
		elif ret["box"] == "xp1000":
			ret["remote"] = "xp1000"
		elif ret["box"].startswith("xpeedlx"):
			ret["remote"] = "xpeedlx"
		elif ret["box"] in ("nbox", "sagemcom88", "esi88", "adb2850", "adb2849", "dsi87"):
			ret["remote"] = "nbox"
		elif ret["box"] == "hd2400":
			ret["remote"] = "hd2400"
		elif ret["box"].startswith("ixuss"):
			ret["remote"] = ret["box"].replace(" ", "")
		else:
			ret["remote"] = "dmm"
		extras = []
		extras.append({ 'key': 'ajax/settings','description': _("Settings")})
		if fileExists(resolveFilename(SCOPE_PLUGINS, "Extensions/LCD4linux/WebSite.pyo")):
			lcd4linux_key = "lcd4linux/config"
			if fileExists(resolveFilename(SCOPE_PLUGINS, "Extensions/WebInterface/plugin.pyo")):
				from Components.config import config
				from Components.Network import iNetwork
				ifaces = iNetwork.getConfiguredAdapters()
				if len(ifaces):
					ip_list = iNetwork.getAdapterAttribute(ifaces[0], "ip") # use only the first configured interface
					ip = "%d.%d.%d.%d" % (ip_list[0], ip_list[1], ip_list[2], ip_list[3])
				try:
					lcd4linux_port = "http://" + ip + ":" + str(config.plugins.Webinterface.http.port.value) + "/"
					lcd4linux_key = lcd4linux_port + 'lcd4linux/config'
				except KeyError:
					lcd4linux_key = None
			if lcd4linux_key:
				extras.append({ 'key': lcd4linux_key, 'description': _("LCD4Linux Setup")})

		try:
			from Plugins.Extensions.AutoTimer.AutoTimer import AutoTimer
			extras.append({ 'key': 'ajax/at','description': _('AutoTimer')})
		except ImportError:
			pass
		if fileExists(resolveFilename(SCOPE_PLUGINS, "Extensions/OpenWebif/controllers/views/ajax/bqe.tmpl")):
			extras.append({ 'key': 'ajax/bqe','description': _('BouquetEditor')})
		
		try:
			from Plugins.Extensions.EPGRefresh.EPGRefresh import epgrefresh
			extras.append({ 'key': 'ajax/epgr','description': _('EPGRefresh')})
		except ImportError:
			pass
		ret['extras'] = extras

		return ret
Example #6
0
    def prepareMainTemplate(self, request):
        # here will be generated the dictionary for the main template
        ret = getCollapsedMenus()
        ret['configsections'] = getConfigsSections()['sections']
        ret['showname'] = getShowName()['showname']
        ret['customname'] = getCustomName()['customname']
        ret['boxname'] = getBoxName()['boxname']
        if not ret['boxname'] or not ret['customname']:
            ret['boxname'] = getInfo()['brand'] + " " + getInfo()['model']
        ret['box'] = getBoxType()
        ret["remote"] = REMOTE
        if hasattr(eEPGCache, 'FULL_DESCRIPTION_SEARCH'):
            ret['epgsearchcaps'] = True
        else:
            ret['epgsearchcaps'] = False
        extras = [{'key': 'ajax/settings', 'description': _("Settings")}]
        ifaces = iNetwork.getConfiguredAdapters()
        if len(ifaces):
            ip_list = iNetwork.getAdapterAttribute(
                ifaces[0], "ip")  # use only the first configured interface
            ip = "%d.%d.%d.%d" % (ip_list[0], ip_list[1], ip_list[2],
                                  ip_list[3])

            if fileExists(
                    resolveFilename(SCOPE_PLUGINS,
                                    "Extensions/LCD4linux/WebSite.pyo")):
                lcd4linux_key = "lcd4linux/config"
                if fileExists(
                        resolveFilename(SCOPE_PLUGINS,
                                        "Extensions/WebInterface/plugin.pyo")):
                    try:
                        lcd4linux_port = "http://" + ip + ":" + str(
                            config.plugins.Webinterface.http.port.value) + "/"
                        lcd4linux_key = lcd4linux_port + 'lcd4linux/config'
                    except:  # noqa: E722
                        lcd4linux_key = None
                if lcd4linux_key:
                    extras.append({
                        'key': lcd4linux_key,
                        'description': _("LCD4Linux Setup"),
                        'nw': '1'
                    })

        self.oscamconf = self.oscamconfPath()
        if self.oscamconf is not None:
            data = open(self.oscamconf, "r").readlines()
            proto = "http"
            port = None
            for i in data:
                if "httpport" in i.lower():
                    port = i.split("=")[1].strip()
                    if port[0] == '+':
                        proto = "https"
                        port = port[1:]
            if port is not None:
                url = "%s://%s:%s" % (proto, request.getRequestHostname(),
                                      port)
                extras.append({
                    'key': url,
                    'description': _("OSCam Webinterface"),
                    'nw': '1'
                })

        try:
            from Plugins.Extensions.AutoTimer.AutoTimer import AutoTimer  # noqa: F401
            extras.append({'key': 'ajax/at', 'description': _('AutoTimer')})
        except ImportError:
            pass

        if fileExists(
                resolveFilename(
                    SCOPE_PLUGINS,
                    "Extensions/OpenWebif/controllers/views/ajax/bqe.tmpl")
        ) or fileExists(
                resolveFilename(
                    SCOPE_PLUGINS,
                    "Extensions/OpenWebif/controllers/views/ajax/bqe.pyo")):
            extras.append({
                'key': 'ajax/bqe',
                'description': _('BouquetEditor')
            })

        try:
            from Plugins.Extensions.EPGRefresh.EPGRefresh import epgrefresh  # noqa: F401
            extras.append({'key': 'ajax/epgr', 'description': _('EPGRefresh')})
        except ImportError:
            pass

        try:
            # this will currenly only works if NO Webiterface plugin installed
            # TODO: test if webinterface AND openwebif installed
            from Plugins.Extensions.WebInterface.WebChilds.Toplevel import loaded_plugins
            for plugins in loaded_plugins:
                if plugins[0] in ["fancontrol", "iptvplayer"]:
                    try:
                        extras.append({
                            'key': plugins[0],
                            'description': plugins[2],
                            'nw': '2'
                        })
                    except KeyError:
                        pass
        except ImportError:
            pass

        if os.path.exists('/usr/bin/shellinaboxd') and (fileExists(
                resolveFilename(
                    SCOPE_PLUGINS,
                    "Extensions/OpenWebif/controllers/views/ajax/terminal.tmpl"
                )
        ) or fileExists(
                resolveFilename(
                    SCOPE_PLUGINS,
                    "Extensions/OpenWebif/controllers/views/ajax/terminal.pyo")
        )):
            extras.append({
                'key': 'ajax/terminal',
                'description': _('Terminal')
            })

        ret['extras'] = extras
        theme = 'original'
        if config.OpenWebif.webcache.theme.value:
            theme = config.OpenWebif.webcache.theme.value
        if not os.path.exists(getPublicPath('themes')):
            if not (theme == 'original' or theme == 'clear'):
                theme = 'original'
                config.OpenWebif.webcache.theme.value = theme
                config.OpenWebif.webcache.theme.save()
        ret['theme'] = theme
        ret['webtv'] = os.path.exists(getPublicPath('webtv'))
        return ret
Example #7
0
    def prepareMainTemplate(self):
        # here will be generated the dictionary for the main template
        ret = getCollapsedMenus()
        ret['remotegrabscreenshot'] = getRemoteGrabScreenshot(
        )['remotegrabscreenshot']
        ret['configsections'] = getConfigsSections()['sections']
        ret['zapstream'] = getZapStream()['zapstream']
        ret['showname'] = getShowName()['showname']
        ret['customname'] = getCustomName()['customname']
        ret['boxname'] = getBoxName()['boxname']
        if not ret['boxname'] or not ret['customname']:
            ret['boxname'] = getInfo()['brand'] + " " + getInfo()['model']
        ret['box'] = "dmm"
        #		if open("/proc/stb/info/model",'r').read().strip().lower() == "gigablue":
        #			ret['box'] = "gigablue"
        if fileExists("/etc/.box"):
            ret['box'] = open("/etc/.box").read().strip().lower()
        elif fileExists("/proc/stb/info/boxtype"):
            ret['box'] = open("/proc/stb/info/boxtype").read().strip().lower()
        elif fileExists("/proc/stb/info/vumodel"):
            ret['box'] = open("/proc/stb/info/vumodel").read().strip().lower()
        elif fileExists("/proc/stb/info/azmodel"):
            ret['box'] = open("/proc/stb/info/azmodel").read().strip().lower()
        elif fileExists("/proc/stb/info/model"):
            ret['box'] = open("/proc/stb/info/model").read().strip().lower()

        if ret["box"] in ("vusolo", "vuduo", "vuuno", "vusolo2", "vuduo2",
                          "vusolose", "vuzero", "solo", "duo", "uno", "solo2",
                          "duo2", "solose", "zero"):
            ret["remote"] = "vu_normal"
        elif ret["box"] in ("vuultimo", "ultimo"):
            ret["remote"] = "vu_ultimo"
        elif ret["box"] == "e3hd":
            ret["remote"] = "e3hd"
        elif ret["box"] in ("et9x00", "et9000", "et9200", "et9500"):
            ret["remote"] = "et9x00"
        elif ret["box"] in ("et5x00", "et5000", "et6x00", "et6000"):
            ret["remote"] = "et5x00"
        elif ret["box"] in ("et4x00", "et4000"):
            ret["remote"] = "et4x00"
        elif ret["box"] == "gbquad":
            ret["remote"] = "gigablue"
        elif ret["box"] == "gbquadplus":
            ret["remote"] = "gbquadplus"
        elif ret["box"] == "et6500":
            ret["remote"] = "et6500"
        elif ret["box"] in ("et8x00", "et8000", "et1x000", "et10000"):
            ret["remote"] = "et8000"
        elif ret["box"] in ("formuler1", "formuler3"):
            ret["remote"] = "formuler1"
        elif ret["box"] in ("azboxme", "azboxminime", "me", "minime"):
            ret["remote"] = "me"
        elif ret["box"] in ("optimussos1", "optimussos1plus", "optimussos2",
                            "optimussos2plus"):
            ret["remote"] = "optimuss"
        elif ret["box"] in ("premium", "premium+"):
            ret["remote"] = "premium"
        elif ret["box"] in ("elite", "ultra"):
            ret["remote"] = "elite"
        elif ret["box"] in ("ini-1000", "ini-1000ru"):
            ret["remote"] = "ini-1000"
        elif ret["box"] in ("ini-1000sv", "ini-5000sv", "ini-9000de"):
            ret["remote"] = "miraclebox"
        elif ret["box"] == "ini-3000":
            ret["remote"] = "ini-3000"
        elif ret["box"] in ("ini-7012", "ini-7000", "ini-5000", "ini-5000ru"):
            ret["remote"] = "ini-7000"
        elif ret["box"].startswith("spark"):
            ret["remote"] = "spark"
        elif ret["box"] == "xp1000":
            ret["remote"] = "xp1000"
        elif ret["box"].startswith("xpeedlx"):
            ret["remote"] = "xpeedlx"
        elif ret["box"] in ("nbox", "esi88", "adb2850", "adb2849", "dsi87"):
            ret["remote"] = "nbox"
        elif ret["box"] == "hd2400":
            ret["remote"] = "hd2400"
        elif ret["box"].startswith("ixuss"):
            ret["remote"] = ret["box"].replace(" ", "")
        else:
            ret["remote"] = "dmm"
        extras = []
        extras.append({'key': 'ajax/settings', 'description': _("Settings")})
        if fileExists(
                resolveFilename(SCOPE_PLUGINS,
                                "Extensions/LCD4linux/WebSite.pyo")):
            lcd4linux_key = "lcd4linux/config"
            if fileExists(
                    resolveFilename(SCOPE_PLUGINS,
                                    "Extensions/WebInterface/plugin.pyo")):
                from Components.config import config
                from Components.Network import iNetwork
                ifaces = iNetwork.getConfiguredAdapters()
                if len(ifaces):
                    ip_list = iNetwork.getAdapterAttribute(
                        ifaces[0],
                        "ip")  # use only the first configured interface
                    ip = "%d.%d.%d.%d" % (ip_list[0], ip_list[1], ip_list[2],
                                          ip_list[3])
                try:
                    lcd4linux_port = "http://" + ip + ":" + str(
                        config.plugins.Webinterface.http.port.value) + "/"
                    lcd4linux_key = lcd4linux_port + 'lcd4linux/config'
                except KeyError:
                    lcd4linux_key = None
            if lcd4linux_key:
                extras.append({
                    'key': lcd4linux_key,
                    'description': _("LCD4Linux Setup")
                })

        try:
            from Plugins.Extensions.AutoTimer.AutoTimer import AutoTimer
            extras.append({'key': 'ajax/at', 'description': _('AutoTimer')})
        except ImportError:
            pass
        if fileExists(
                resolveFilename(
                    SCOPE_PLUGINS,
                    "Extensions/OpenWebif/controllers/views/ajax/bqe.tmpl")):
            extras.append({
                'key': 'ajax/bqe',
                'description': _('BouquetEditor')
            })

        try:
            from Plugins.Extensions.EPGRefresh.EPGRefresh import epgrefresh
            extras.append({'key': 'ajax/epgr', 'description': _('EPGRefresh')})
        except ImportError:
            pass
        ret['extras'] = extras

        return ret