• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python info.getInfo函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中models.info.getInfo函数的典型用法代码示例。如果您正苦于以下问题:Python getInfo函数的具体用法?Python getInfo怎么用?Python getInfo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getInfo函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: prepareMainTemplate

    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
开发者ID:rdamas,项目名称:e2openplugin-OpenWebif,代码行数:60,代码来源:base.py


示例2: prepareMainTemplate

	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
开发者ID:Leatherface75,项目名称:enigma2pc,代码行数:49,代码来源:base.py


示例3: P_boxinfo

	def P_boxinfo(self, request):
		info = getInfo()
		if fileExists(getPublicPath("/images/boxes/" + info["model"] + ".jpg")):
			info["boximage"] = info["model"] + ".jpg"
		else:
			info["boximage"] = "unknown.jpg"
		return info
开发者ID:betz,项目名称:e2openplugin-OpenWebif,代码行数:7,代码来源:ajax.py


示例4: P_boxinfo

	def P_boxinfo(self, request):
		info = getInfo()
		model = info["model"]
		if model == "et9000" or model == "et9200":
			model = "et9x00"
		elif model == "et5000" or model == "et6000":
			model = "et5x00"
		elif model == "mediabox": 
			model = "Mediabox HD LX-1"
		elif model == "optimussos1":
			model = "Optimuss OS1"
		elif model == "optimussos2":
			model = "Optimuss OS2"
		elif model == "et4000" :
			model = "et4x00"
		elif model == "xp1000" :
			model = "xp1000"
		elif model == "tmnano3tcombo":
			model = "force1plus"
		elif model == "tmnanosem2":
			model = "tmnanosem2"
		elif model == "tmnanoseplus":
			model = "tmnanoseplus"
		if fileExists(getPublicPath("/images/boxes/" + model + ".jpg")):
			info["boximage"] = model + ".jpg"
		else:
			info["boximage"] = "unknown.jpg"
		return info
开发者ID:MOA-2011,项目名称:e2openplugins,代码行数:28,代码来源:ajax.py


示例5: P_boxinfo

	def P_boxinfo(self, request):
		info = getInfo()
		model = info["boxtype"]
		if model in ("et9000", "et9200", "et9500"):
			model = "et9x00"
		elif model in ("et5000", "et6000", "et6x00"):
			model = "et5x00"
		elif model == "et4000":
			model = "et4x00"
		elif model == "xp1000":
			model = "xp1000"
		elif model.startswith("vu"):
			model = model.replace("vu", "")
		elif model in ("bska", "bxzb"):
			model = "nbox_white"
		elif model in ("bsla", "bzzb"):
			model = "nbox"
		elif model == "sagemcom88":
			model = "esi88"
		if fileExists(getPublicPath("/images/boxes/" + model + ".jpg")):
			info["boximage"] = model + ".jpg"
		else:
			info["boximage"] = "unknown.jpg"
		if model in ("tf7700hdpvr", "topf", "TF 7700 HDPVR"):
			info["model"] = "TF 7700 HDPVR"
			if fileExists(getPublicPath("/images/boxes/topf.jpg")):
				info["boximage"] = "topf.jpg"
		return info
开发者ID:system-it,项目名称:e2openplugin-OpenWebif,代码行数:28,代码来源:ajax.py


示例6: P_boxinfo

	def P_boxinfo(self, request):
		info = getInfo()
		type = getBoxType()

		if fileExists(getPublicPath("/images/boxes/"+type+".jpg")):
			info["boximage"] = type+".jpg"
		else:
			info["boximage"] = "unknown.jpg?notfound"+type
		return info
开发者ID:MDXDave,项目名称:ModernWebif,代码行数:9,代码来源:ajax.py


示例7: P_movies

	def P_movies(self, request):
		if "dirname" in request.args.keys():
			movies = getMovieList(request.args["dirname"][0])
		else:
			movies = getMovieList()
		info = getInfo()
		model = info["model"]
		movies['transcoding'] = False
		if model in ("solo2", "duo2", "Sezam Marvel", "Xpeed LX3", "gbquad", "gbquadplus") and path.exists(eEnv.resolve('${libdir}/enigma2/python/Plugins/SystemPlugins/TransCodingSetup/plugin.pyo')):
			movies['transcoding'] = True
		return movies
开发者ID:OpenLD,项目名称:e2openplugin-OpenWebif,代码行数:11,代码来源:ajax.py


示例8: P_movies

	def P_movies(self, request):
		if "dirname" in request.args.keys():
			movies = getMovieList(request.args["dirname"][0])
		else:
			movies = getMovieList()
		info = getInfo()
		model = info["model"]
		movies['transcoding'] = False
		if model in ("solo2", "duo2"):
			movies['transcoding'] = True
		return movies
开发者ID:berkantxx27,项目名称:e2openplugin-OpenWebif,代码行数:11,代码来源:ajax.py


示例9: P_boxinfo

	def P_boxinfo(self, request):
		info = getInfo()
		model = info["model"]
		if model == "et9000" or model == "et9200":
			model = "et9x00"
		elif model == "et5000" or model == "et6000":
			model = "et5x00"
		if fileExists(getPublicPath("/images/boxes/" + model + ".jpg")):
			info["boximage"] = model + ".jpg"
		else:
			info["boximage"] = "unknown.jpg"
		return info
开发者ID:Cimarast,项目名称:e2openplugin-OpenWebif,代码行数:12,代码来源:ajax.py


示例10: P_movies

	def P_movies(self, request):
		if "dirname" in request.args.keys():
			movies = getMovieList(request.args["dirname"][0])
		else:
			movies = getMovieList()
		info = getInfo()
		model = info["model"]
		chipset = info["chipset"]
		movies['transcoding'] = False
		if model in ("solo2", "duo2", "solose", "vusolo2", "vuduo2", "vusolose", "xpeedlx3", "gbquad", "gbquadplus") or chipset in ("7356"): # 7356 model default transcoding
			movies['transcoding'] = True
		return movies
开发者ID:emedril,项目名称:enigma2-plugin-extensions-openwebif,代码行数:12,代码来源:ajax.py


示例11: P_getipv6

	def P_getipv6(self, request):
		request.setHeader("content-type", "text/html")
		firstpublic = ''
		info = getInfo()['ifaces']
		for iface in info:
			public = iface['firstpublic']
			if public is not None:
				firstpublic = public
				break

		return {
			"firstpublic": firstpublic
		}
开发者ID:athoik,项目名称:e2openplugin-OpenWebif,代码行数:13,代码来源:web.py


示例12: P_channels

	def P_channels(self, request):
		stype = "tv"
		idbouquet = "ALL"
		if "stype" in request.args.keys():
			stype = request.args["stype"][0]
		if "id" in request.args.keys():
			idbouquet = request.args["id"][0]
		channels = getChannels(idbouquet, stype)
		info = getInfo()
		model = info["model"]
		channels['transcoding'] = False
		if model in ("solo2", "duo2"): 
			channels['transcoding'] = True
		return channels
开发者ID:rodrigopill,项目名称:e2openplugin-OpenWebif,代码行数:14,代码来源:ajax.py


示例13: P_channels

	def P_channels(self, request):
		stype = "tv"
		idbouquet = "ALL"
		if "stype" in request.args.keys():
			stype = request.args["stype"][0]
		if "id" in request.args.keys():
			idbouquet = request.args["id"][0]
		channels = getChannels(idbouquet, stype)
		info = getInfo()
		model = info["model"]
		channels['transcoding'] = False
		if model in ("solo2", "duo2", "Sezam Marvel", "Xpeed LX3", "gbquad", "gbquadplus") and path.exists(eEnv.resolve('${libdir}/enigma2/python/Plugins/SystemPlugins/TransCodingSetup/plugin.pyo')): 
			channels['transcoding'] = True
		return channels
开发者ID:OpenLD,项目名称:e2openplugin-OpenWebif,代码行数:14,代码来源:ajax.py


示例14: P_channels

	def P_channels(self, request):
		stype = "tv"
		idbouquet = "ALL"
		if "stype" in request.args.keys():
			stype = request.args["stype"][0]
		if "id" in request.args.keys():
			idbouquet = request.args["id"][0]
		channels = getChannels(idbouquet, stype)
		info = getInfo()
		model = info["model"]
		chipset = info["chipset"] # for chipset 7356 transcoding
		channels['transcoding'] = False
		if model in ("solo2", "duo2", "solose", "vusolo2", "vuduo2", "vusolose", "xpeedlx3", "gbquad", "gbquadplus") or chipset in ("7356"):
			channels['transcoding'] = True
#		print "@@@@@@@@@@@@ chipset @@@@@@@@@@@@@@@", chipset 

		return channels
开发者ID:emedril,项目名称:enigma2-plugin-extensions-openwebif,代码行数:17,代码来源:ajax.py


示例15: prepareMainTemplate

	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
开发者ID:MCelliotG,项目名称:e2openplugin-OpenWebif,代码行数:90,代码来源:base.py


示例16: P_boxinfo

	def P_boxinfo(self, request):
		info = getInfo()
		type = getBoxType()
                print "##### getBoxType", getBoxType()
                if fileExists("/etc/.brandtype"):
                        ret_brand = open("/etc/.brandtype").read().strip().lower()
			if ret_brand == "technomate":
				if type == "TM-NANO-3T COMBO":
					type = "tmnano3tcombo"
				elif type == "tmnano2super":
					type = "te_tmnano2super"
				elif type == "TM-NANO-SE":
					type = "tmnanose"
				elif type == "TM-NANO-SE Combo":
					type = "tmnanosecombo"
				elif type == "TM-NANO-SE M2":
					type = "tmnanosem2"
				elif type == "TM-NANO-SE Plus":
					type = "tmnanoseplus"
				elif type == "TM-MINI-SE":
					type = "tmminise"
				else:
					type = getBoxType()
			elif ret_brand == "edision":
				if type.endswith("OS1"):
					type = "optimussos1"
				elif type.endswith("OS2"):
					type = "optimussos2"
				elif type.endswith("OS1PLUS"):
					type = "ed_op1plus"
				elif type.endswith("OS2PLUS"):
					type = "ed_op2plus"
				elif type.endswith("OS3+"):
					type = "ed_force1plus"
				elif type.endswith("OS"):
					type = "optimussos"
				else:
					type = getBoxType()
			elif ret_brand == "worldvision":
				if type == "Force1+":
					type = "wo_force1plus"
				elif type == "force1":
					type = "wo_force1"
				elif type == "force2solid":
					type = "wo_force2solid"
				elif type == "force2":
					type = "wo_force2solid"
				else:
					type = getBoxType()
			elif ret_brand == "swiss":
				if type == "Force1+":
					type = "sw_force1plus"
				elif type == "force1":
					type = "sw_force1"
				else:
					type = getBoxType()
			elif ret_brand == "xsarius":
				if type == "FUSION HD":
					type = "fusionhd"
				elif type == "FUSION HD SE":
					model = "fusionhdse"
				elif type == "PURE HD":
					model = "purehd"
				elif type == "SELF SAT":
					type = "selfsat"
				else:
					type = getBoxType()
			elif ret_brand  == "iqon":
				if type == "Force1+":
					type = "iq_force1plus"
				elif type == "force1":
					type = "iq_force1"
				elif type == "force2":
					type = "iq_force2"
				elif type == "force2solid":
					type = "iq_force2"
				elif type == "force2plus":
					type = "iq_force2plus"
				elif type == "force2se":
					type = "iq_force2se"
				elif type == "force2nano":
					type = "iq_force2nano"
				elif type == "force2plushv":
					type = "iq_force2plushv"
				elif type == "PURE HD":
					type = "purehd"
				elif type == "force3":
					type ="iq_force3"
				elif type == "force3se":
					type ="iq_force3se"
				elif type == "force3uhd":
					type ="iq_force3uhd"
				elif type == "force3uhdplus":
					type ="iq_force3uhdplus"
				elif type == "SELF SAT":
					type = "selfsat"
				elif type == "ios100hd":
					type = "iq_ios100"
				elif type == "ios200hd":
					type = "iq_ios200"
#.........这里部分代码省略.........
开发者ID:MOA-2011,项目名称:e2openplugin-OpenWebif,代码行数:101,代码来源:ajax.py


示例17: P_deviceinfo

	def P_deviceinfo(self, request):
		return getInfo(need_fullinfo=True)
开发者ID:HDMU,项目名称:e2openplugin-OpenWebif,代码行数:2,代码来源:web.py


示例18: P_about

	def P_about(self, request):
		return {
			"info": getInfo(need_fullinfo=True),
			"service": getCurrentService(self.session)
		}
开发者ID:HDMU,项目名称:e2openplugin-OpenWebif,代码行数:5,代码来源:web.py


示例19: prepareMainTemplate

	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:
#.........这里部分代码省略.........
开发者ID:system-it,项目名称:e2openplugin-OpenWebif,代码行数:101,代码来源:base.py


示例20: prepareMainTemplate

	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
开发者ID:MDXDave,项目名称:ModernWebif,代码行数:63,代码来源:base.py



注:本文中的models.info.getInfo函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python insight.Insight类代码示例发布时间:2022-05-27
下一篇:
Python import_ufo.import_model函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap