当前位置: 首页>>代码示例>>Python>>正文


Python info.getInfo函数代码示例

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


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


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