コード例 #1
0
    def __init__(self, session, path=""):
        BaseController.__init__(self, path)
        self.session = session
        piconpath = getPiconPath()

        self.putChild("web", WebController(session))
        self.putChild("api", ApiController(session))
        self.putChild("ajax", AjaxController(session))
        self.putChild("file", FileController(session))
        self.putChild("grab", grabScreenshot(session))
        self.putChild("mobile", MobileController(session))
        self.putChild("js", static.File(getPublicPath() + "/js"))
        self.putChild("css", static.File(getPublicPath() + "/css"))
        self.putChild("static", static.File(getPublicPath() + "/static"))
        self.putChild("images", static.File(getPublicPath() + "/images"))
        self.putChild("ipkg", IpkgController(session))
        self.putChild("autotimer", ATController(session))
        self.putChild("serienrecorder", SRController(session))
        self.putChild("epgrefresh", ERController(session))
        self.putChild("bouqueteditor", BQEController(session))
        self.putChild("transcoding", TranscodingController(session))
        self.putChild("wol", WOLClientController(session))
        self.putChild("wolsetup", WOLSetupController(session))
        if piconpath:
            self.putChild("picon", static.File(piconpath))
コード例 #2
0
 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
コード例 #3
0
	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
コード例 #4
0
ファイル: root.py プロジェクト: MDXDave/ModernWebif
	def __init__(self, session, path = ""):
		BaseController.__init__(self, path)
		self.session = session
		piconpath = getPiconPath()

		self.putChild("web", WebController(session))
		self.putChild("api", ApiController(session))
		self.putChild("ajax", AjaxController(session))
		self.putChild("file", FileController(session))
		self.putChild("grab", grabScreenshot(session))
		self.putChild("mobile", MobileController(session))
		self.putChild("js", static.File(getPublicPath() + "/js"))
		self.putChild("fonts", static.File(getPublicPath() + "/fonts"))
		self.putChild("css", static.File(getPublicPath() + "/css"))
		self.putChild("static", static.File(getPublicPath() + "/static"))
		self.putChild("images", static.File(getPublicPath() + "/images"))
		self.putChild("ipkg", IpkgController(session))
		self.putChild("autotimer", ATController(session))
		self.putChild("serienrecorder", SRController(session))
		self.putChild("epgrefresh", ERController(session))
		self.putChild("bouqueteditor", BQEController(session))
		self.putChild("transcoding", TranscodingController(session))
		self.putChild("wol", WOLClientController(session))
		self.putChild("wolsetup", WOLSetupController(session))
		if piconpath:
			self.putChild("picon", static.File(piconpath))
コード例 #5
0
ファイル: root.py プロジェクト: lprot/e2openplugin-OpenWebif
    def __init__(self, session, path=""):
        BaseController.__init__(self, path=path, session=session)
        piconpath = getPiconPath()

        self.putChild("web", WebController(session))
        self.putChild("api", ApiController(session))
        self.putChild("ajax", AjaxController(session))
        self.putChild("file", FileController())
        self.putChild("grab", grabScreenshot(session))
        if os.path.exists(getPublicPath('mobile')):
            self.putChild("mobile", MobileController(session))
            self.putChild("m", static.File(getPublicPath() + "/mobile"))
        for static_val in ('js', 'css', 'static', 'images', 'fonts'):
            self.putChild(static_val,
                          static.File(getPublicPath() + '/' + static_val))
        for static_val in ('themes', 'webtv', 'vxg'):
            if os.path.exists(getPublicPath(static_val)):
                self.putChild(static_val,
                              static.File(getPublicPath() + '/' + static_val))

        if os.path.exists('/usr/bin/shellinaboxd'):
            self.putChild("terminal",
                          proxy.ReverseProxyResource('::1', 4200, '/'))
        self.putChild("ipkg", IpkgController(session))
        self.putChild("autotimer", ATController(session))
        self.putChild("serienrecorder", SRController(session))
        self.putChild("epgrefresh", ERController(session))
        self.putChild("bouqueteditor", BQEController(session))
        self.putChild("transcoding", TranscodingController())
        self.putChild("wol", WOLClientController())
        self.putChild("wolsetup", WOLSetupController(session))
        if piconpath:
            self.putChild("picon", static.File(piconpath))
        self.putChild("net", NetController(session))
コード例 #6
0
	def __init__(self, session, path = ""):
		BaseController.__init__(self, path)
		self.session = session
		self.controller = None

		self.putChild("control", WebController(session))
		self.putChild("ajax", AjaxController(session))
		self.putChild("api", ApiController(session))
		self.putChild("js", static.File(getPublicPath() + "/js"))
		self.putChild("css", static.File(getPublicPath() + "/css"))
		self.putChild("images", static.File(getPublicPath() + "/images"))
コード例 #7
0
	def P_boxinfo(self, request):
		info = getInfo(self.session, need_fullinfo = True)
		type = getBoxType()

		if fileExists(getPublicPath("/images/boxes/"+type+".png")):
			info["boximage"] = type+".png"
		elif fileExists(getPublicPath("/images/boxes/"+type+".jpg")):
			info["boximage"] = type+".jpg"
		else:
			info["boximage"] = "unknown.png"
		return info
コード例 #8
0
	def P_boxinfo(self, request):
		info = getInfo(self.session, need_fullinfo = True)
		type = getBoxType()

		if fileExists(getPublicPath("/images/boxes/"+type+".png")):
			info["boximage"] = type+".png"
		elif fileExists(getPublicPath("/images/boxes/"+type+".jpg")):
			info["boximage"] = type+".jpg"
		else:
			info["boximage"] = "unknown.png"
		return info
コード例 #9
0
ファイル: ajax.py プロジェクト: MOA-2011/e2openplugins
 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
コード例 #10
0
ファイル: ajax.py プロジェクト: MOA-2011/e2openplugins
	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
コード例 #11
0
 def P_webtv(self, request):
     if config.OpenWebif.auth_for_streaming.value:
         session = GetSession()
         if session.GetAuth(request) is not None:
             auth = ':'.join(session.GetAuth(request)) + "@"
         else:
             auth = '-sid:' + str(session.GetSID(request)) + "@"
     else:
         auth = ''
     vxgenabled = False
     if fileExists(getPublicPath("/vxg/media_player.pexe")):
         vxgenabled = True
     transcoding = getTranscodingSupport()
     transcoder_port = 0
     if transcoding:
         try:
             transcoder_port = int(
                 config.plugins.transcodingsetup.port.value)
             if getMachineBuild() in ('inihdp', 'hd2400', 'et10000',
                                      'ew7356', 'formuler1tc'):
                 transcoder_port = int(config.OpenWebif.streamport.value)
         except StandardError:
             transcoder_port = 0
     return {
         "transcoder_port": transcoder_port,
         "vxgenabled": vxgenabled,
         "auth": auth
     }
コード例 #12
0
	def __init__(self, session, path = ""):
		BaseController.__init__(self, path)
		self.session = session
		piconpath = getPiconPath()
		
		self.putChild("web", WebController(session))
		self.putChild("api", ApiController(session))
		self.putChild("ajax", AjaxController(session))
		self.putChild("file", FileController(session))
		self.putChild("grab", grabScreenshot(session))
		self.putChild("mobile", MobileController(session))
		self.putChild("js", static.File(getPublicPath() + "/js"))
		self.putChild("css", static.File(getPublicPath() + "/css"))
		self.putChild("images", static.File(getPublicPath() + "/images"))
		if piconpath:
			self.putChild("picon", static.File(piconpath))
コード例 #13
0
ファイル: ajax.py プロジェクト: betz/e2openplugin-OpenWebif
	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
コード例 #14
0
    def __init__(self, session, path=""):
        BaseController.__init__(self, path)
        self.session = session
        piconpath = getPiconPath()

        self.putChild("web", WebController(session))
        self.putChild("api", ApiController(session))
        self.putChild("ajax", AjaxController(session))
        self.putChild("file", FileController(session))
        self.putChild("grab", grabScreenshot(session))
        self.putChild("mobile", MobileController(session))
        self.putChild("js", static.File(getPublicPath() + "/js"))
        self.putChild("css", static.File(getPublicPath() + "/css"))
        self.putChild("images", static.File(getPublicPath() + "/images"))
        if piconpath:
            self.putChild("picon", static.File(piconpath))
コード例 #15
0
 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
コード例 #16
0
	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
コード例 #17
0
ファイル: root.py プロジェクト: HDMU/e2openplugin-OpenWebif
	def P_index(self, request):
		mode = ''
		if "mode" in request.args.keys():
			mode = request.args["mode"][0]
		uagent = request.getHeader('User-Agent')
		if uagent and mode != 'fullpage' and os.path.exists(getPublicPath('mobile')):
			if uagent.lower().find("iphone") != -1 or uagent.lower().find("ipod") != -1 or uagent.lower().find("blackberry") != -1 or uagent.lower().find("mobile") != -1:
				request.setHeader("Location", "/mobile/")
				request.setResponseCode(http.FOUND)
				return ""
		return {}
コード例 #18
0
ファイル: root.py プロジェクト: spaJR/e2openplugin-OpenWebif
	def P_index(self, request):
		mode = ''
		if "mode" in request.args.keys():
			mode = request.args["mode"][0]
		uagent = request.getHeader('User-Agent')
		if uagent and mode != 'fullpage' and os.path.exists(getPublicPath('mobile')):
			if uagent.lower().find("iphone") != -1 or uagent.lower().find("ipod") != -1 or uagent.lower().find("blackberry") != -1 or uagent.lower().find("mobile") != -1:
				request.setHeader("Location", "/mobile/")
				request.setResponseCode(http.FOUND)
				return ""
		return {}
コード例 #19
0
	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
コード例 #20
0
 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
コード例 #21
0
ファイル: ajax.py プロジェクト: Dima73/e2openplugin-OpenWebif
 def P_webtv(self, request):
     vxgenabled = False
     if fileExists(getPublicPath("/js/media_player.pexe")):
         vxgenabled = True
     transcoding = getTranscodingSupport()
     transcoder_port = 0
     if transcoding:
         try:
             transcoder_port = int(config.plugins.transcodingsetup.port.value)
             if getMachineBuild() in ("inihdp", "hd2400", "et10000", "ew7356"):
                 transcoder_port = int(config.OpenWebif.streamport.value)
         except StandardError:
             transcoder_port = 0
     return {"transcoder_port": transcoder_port, "vxgenabled": vxgenabled}
コード例 #22
0
 def P_settings(self, request):
     ret = {"result": True}
     ret['configsections'] = getConfigsSections()['sections']
     if config.OpenWebif.webcache.theme.value:
         if os.path.exists(getPublicPath('themes')):
             ret['themes'] = config.OpenWebif.webcache.theme.choices
         else:
             ret['themes'] = ['original', 'clear']
         ret['theme'] = config.OpenWebif.webcache.theme.value
     else:
         ret['themes'] = []
         ret['theme'] = 'original'
     ret['zapstream'] = getZapStream()['zapstream']
     ret['showchannelpicon'] = getShowChPicon()['showchannelpicon']
     return ret
コード例 #23
0
	def P_webtv(self, request):
		session = GetSession()
		sid = str(session.GetSID(request))
		vxgenabled = False
		if fileExists(getPublicPath("/js/media_player.pexe")):
			vxgenabled = True
		transcoding = getTranscodingSupport()
		transcoder_port = 0
		if transcoding:
			try:
				transcoder_port = int(config.plugins.transcodingsetup.port.value)
				if getMachineBuild() in ('inihdp', 'hd2400', 'et10000','ew7356'):
					transcoder_port = int(config.OpenWebif.streamport.value)
			except StandardError:
				transcoder_port = 0
		return {"transcoder_port" : transcoder_port, "vxgenabled" : vxgenabled, "sid" : sid}
コード例 #24
0
	def P_settings(self, request):
		ret = {
			"result": True
		}
		ret['configsections'] = getConfigsSections()['sections']
		if config.OpenWebif.webcache.theme.value:
			if os.path.exists(getPublicPath('themes')):
				ret['themes'] = config.OpenWebif.webcache.theme.choices
			else:
				ret['themes'] = ['original','clear']
			ret['theme'] = config.OpenWebif.webcache.theme.value
		else:
			ret['themes'] = []
			ret['theme'] = 'original'
		ret['zapstream'] = getZapStream()['zapstream']
		ret['showchannelpicon'] = getShowChPicon()['showchannelpicon']
		return ret
コード例 #25
0
 def P_index(self, request):
     if config.OpenWebif.responsive_enabled.value and os.path.exists(
             getBasePath() + "/controllers/views/responsive"):
         return {}
     mode = ''
     if "mode" in request.args.keys():
         mode = request.args["mode"][0]
     uagent = request.getHeader('User-Agent')
     if uagent and mode != 'fullpage' and os.path.exists(
             getPublicPath('mobile')):
         if uagent.lower().find("iphone") != -1 or uagent.lower(
         ).find("ipod") != -1 or uagent.lower().find(
                 "blackberry") != -1 or uagent.lower().find("mobile") != -1:
             request.setHeader("Location", "/mobile/")
             request.setResponseCode(http.FOUND)
             return ""
     return {}
コード例 #26
0
	def P_webtv(self, request):
		if config.OpenWebif.auth_for_streaming.value:
			session = GetSession()
			if session.GetAuth(request) is not None:
				auth = ':'.join(session.GetAuth(request)) + "@"
			else:
				auth = '-sid:' + str(session.GetSID(request)) + "@"
		else:
			auth=''
		vxgenabled = False
		if fileExists(getPublicPath("/vxg/media_player.pexe")):
			vxgenabled = True
		transcoding = getTranscodingSupport()
		transcoder_port = 0
		if transcoding:
			try:
				transcoder_port = int(config.plugins.transcodingsetup.port.value)
				if getMachineBuild() in ('inihdp', 'hd2400', 'et10000','ew7356','formuler1'):
					transcoder_port = int(config.OpenWebif.streamport.value)
			except StandardError:
				transcoder_port = 0
		return {"transcoder_port" : transcoder_port, "vxgenabled" : vxgenabled, "auth" : auth}
コード例 #27
0
    def __init__(self, session, path=""):
        BaseController.__init__(self, path=path, session=session)
        piconpath = getPiconPath()

        self.putChild("web", WebController(session))
        self.putChild("api", ApiController(session))
        self.putChild("ajax", AjaxController(session))

        encoder_factory = rest_fs_access.GzipEncodeByFileExtensionFactory(
            extensions=[
                'txt', 'json', 'html', 'xml', 'js', 'conf', 'cfg', 'eit', 'sc',
                'ap'
            ])
        #: gzip compression enabled file controller
        wrapped_fs_controller = EncodingResourceWrapper(
            rest_fs_access.FileController(root='/',
                                          resource_prefix="/file",
                                          session=session), [encoder_factory])
        self.putChild("file", wrapped_fs_controller)
        self.putChild("grab", grabScreenshot(session))
        if os.path.exists(getPublicPath('mobile')):
            self.putChild("mobile", MobileController(session))
            self.putChild("m", static.File(getPublicPath() + "/mobile"))
        self.putChild("js", static.File(getPublicPath() + "/js"))
        self.putChild("css", static.File(getPublicPath() + "/css"))
        self.putChild("static", static.File(getPublicPath() + "/static"))
        self.putChild("images", static.File(getPublicPath() + "/images"))
        self.putChild("fonts", static.File(getPublicPath() + "/fonts"))
        if os.path.exists(getPublicPath('themes')):
            self.putChild("themes", static.File(getPublicPath() + "/themes"))
        if os.path.exists(getPublicPath('webtv')):
            self.putChild("webtv", static.File(getPublicPath() + "/webtv"))
        if os.path.exists(getPublicPath('vxg')):
            self.putChild("vxg", static.File(getPublicPath() + "/vxg"))
        if os.path.exists('/usr/bin/shellinaboxd'):
            self.putChild("terminal",
                          proxy.ReverseProxyResource('::1', 4200, '/'))
        self.putChild("ipkg", IpkgController(session))
        self.putChild("autotimer", ATController(session))
        self.putChild("serienrecorder", SRController(session))
        self.putChild("epgrefresh", ERController(session))
        self.putChild("bouqueteditor", BQEController(session))
        self.putChild("transcoding", TranscodingController())
        self.putChild("wol", WOLClientController())
        self.putChild("wolsetup", WOLSetupController(session))
        if piconpath:
            self.putChild("picon", static.File(piconpath))
コード例 #28
0
ファイル: root.py プロジェクト: spaJR/e2openplugin-OpenWebif
	def __init__(self, session, path = ""):
		BaseController.__init__(self, path)
		self.session = session
		piconpath = getPiconPath()

		self.putChild("web", WebController(session))
		self.putChild("api", ApiController(session))
		self.putChild("ajax", AjaxController(session))
		self.putChild("file", FileController(session))
		self.putChild("grab", grabScreenshot(session))
		if os.path.exists(getPublicPath('mobile')):
			self.putChild("mobile", MobileController(session))
			self.putChild("m", static.File(getPublicPath() + "/mobile"))
		self.putChild("js", static.File(getPublicPath() + "/js"))
		self.putChild("css", static.File(getPublicPath() + "/css"))
		self.putChild("static", static.File(getPublicPath() + "/static"))
		self.putChild("images", static.File(getPublicPath() + "/images"))
		self.putChild("fonts", static.File(getPublicPath() + "/fonts"))
		if os.path.exists(getPublicPath('themes')):
			self.putChild("themes", static.File(getPublicPath() + "/themes"))
		if os.path.exists(getPublicPath('webtv')):
			self.putChild("webtv", static.File(getPublicPath() + "/webtv"))
		if os.path.exists(getPublicPath('vxg')):
			self.putChild("vxg", static.File(getPublicPath() + "/vxg"))
		if os.path.exists('/usr/bin/shellinaboxd'):
			self.putChild("terminal", proxy.ReverseProxyResource('::1', 4200, '/'))
		self.putChild("ipkg", IpkgController(session))
		self.putChild("autotimer", ATController(session))
		self.putChild("serienrecorder", SRController(session))
		self.putChild("epgrefresh", ERController(session))
		self.putChild("bouqueteditor", BQEController(session))
		self.putChild("transcoding", TranscodingController(session))
		self.putChild("wol", WOLClientController(session))
		self.putChild("wolsetup", WOLSetupController(session))
		if piconpath:
			self.putChild("picon", static.File(piconpath))
コード例 #29
0
ファイル: root.py プロジェクト: GeirJ/e2openplugin-OpenWebif
	def __init__(self, session, path = ""):
		BaseController.__init__(self, path=path, session=session)
		piconpath = getPiconPath()

		self.putChild("web", WebController(session))
		self.putChild("api", ApiController(session))
		self.putChild("ajax", AjaxController(session))
		self.putChild("file", FileController())
		self.putChild("grab", grabScreenshot(session))
		if os.path.exists(getPublicPath('mobile')):
			self.putChild("mobile", MobileController(session))
			self.putChild("m", static.File(getPublicPath() + "/mobile"))
		self.putChild("js", static.File(getPublicPath() + "/js"))
		self.putChild("css", static.File(getPublicPath() + "/css"))
		self.putChild("static", static.File(getPublicPath() + "/static"))
		self.putChild("images", static.File(getPublicPath() + "/images"))
		self.putChild("fonts", static.File(getPublicPath() + "/fonts"))
		if os.path.exists(getPublicPath('themes')):
			self.putChild("themes", static.File(getPublicPath() + "/themes"))
		if os.path.exists(getPublicPath('webtv')):
			self.putChild("webtv", static.File(getPublicPath() + "/webtv"))
		if os.path.exists(getPublicPath('vxg')):
			self.putChild("vxg", static.File(getPublicPath() + "/vxg"))
		if os.path.exists('/usr/bin/shellinaboxd'):
			self.putChild("terminal", proxy.ReverseProxyResource('::1', 4200, '/'))
		self.putChild("ipkg", IpkgController(session))
		self.putChild("autotimer", ATController(session))
		self.putChild("serienrecorder", SRController(session))
		self.putChild("epgrefresh", ERController(session))
		self.putChild("bouqueteditor", BQEController(session))
		self.putChild("transcoding", TranscodingController())
		self.putChild("wol", WOLClientController())
		self.putChild("wolsetup", WOLSetupController(session))
		if piconpath:
			self.putChild("picon", static.File(piconpath))
コード例 #30
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
        from Components.config import config
        if hasattr(eEPGCache, 'FULL_DESCRIPTION_SEARCH'):
            ret['epgsearchcaps'] = True
        else:
            ret['epgsearchcaps'] = False
        extras = []
        extras.append({'key': 'ajax/settings', 'description': _("Settings")})
        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])

        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"),
                    '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
            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

        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
コード例 #31
0
	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"
				elif type == "ios300hd":
					type = "iq_ios300"
				elif type == "ios300newhd":
					type = "iq_ios300new"
				else:
					type = getBoxType()
			else:
				model = getBoxType()

		if fileExists(getPublicPath("/images/boxes/"+type+".jpg")):
			info["boximage"] = type+".jpg"
                        print "##### boximage", info["boximage"]
		else:
			info["boximage"] = "unknown.jpg"
		return info
コード例 #32
0
ファイル: root.py プロジェクト: HDMU/e2openplugin-OpenWebif
	def __init__(self, session, path = ""):
		BaseController.__init__(self, path)
		self.session = session
		piconpath = getPiconPath()

		self.putChild("web", WebController(session))
		self.putChild("api", ApiController(session))
		self.putChild("ajax", AjaxController(session))
		self.putChild("file", FileController(session))
		self.putChild("grab", grabScreenshot(session))
		if os.path.exists(getPublicPath('mobile')):
			self.putChild("mobile", MobileController(session))
			self.putChild("m", static.File(getPublicPath() + "/mobile"))
		self.putChild("js", static.File(getPublicPath() + "/js"))
		self.putChild("rc", static.File("/usr/share/enigma2/rc_models"))
		self.putChild("css", static.File(getPublicPath() + "/css"))
		self.putChild("static", static.File(getPublicPath() + "/static"))
		self.putChild("images", static.File(getPublicPath() + "/images"))
		self.putChild("fonts", static.File(getPublicPath() + "/fonts"))
		if os.path.exists(getPublicPath('themes')):
			self.putChild("themes", static.File(getPublicPath() + "/themes"))
		if os.path.exists(getPublicPath('webtv')):
			self.putChild("webtv", static.File(getPublicPath() + "/webtv"))
		if os.path.exists(getPublicPath('vxg')):
			self.putChild("vxg", static.File(getPublicPath() + "/vxg"))
		self.putChild("ipkg", IpkgController(session))
		self.putChild("autotimer", ATController(session))
		self.putChild("serienrecorder", SRController(session))
		self.putChild("epgrefresh", ERController(session))
		self.putChild("bouqueteditor", BQEController(session))
		self.putChild("transcoding", TranscodingController(session))
		self.putChild("wol", WOLClientController(session))
		self.putChild("wolsetup", WOLSetupController(session))
		if piconpath:
			self.putChild("picon", static.File(piconpath))
コード例 #33
0
	def P_boxinfo(self, request):
		info = getInfo()
		model = info["model"]
		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", "")
		if fileExists("/etc/.brandtype"):
			ret_brand = open("/etc/.brandtype").read().strip().lower()
#			print "@@@@@ [model] @@@@@", model
			if ret_brand == "technomate":
				if model == "TM-NANO-3T COMBO":
					model = "tmnano3tcombo"
				elif model == "tmnano2super":
					model = "te_tmnano2super"
				elif model == "TM-NANO-SE":
					model = "tmnanose"
				elif model == "TM-NANO-SE Combo":
					model = "tmnanosecombo"
				elif model == "TM-NANO-SE M2":
					model = "tmnanosem2"
				elif model == "TM-NANO-SE Plus":
					model = "tmnanoseplus"
				elif model == "TM-NANO M3":
					model = "tmnanom3"
				else:
					model = info["model"]
			elif ret_brand == "edision":
				if model.endswith("OS1"):
					model = "optimussos1"
				elif model.endswith("OS2"):
					model = "optimussos2"
				elif model.endswith("OS1PLUS"):
					model = "ed_op1plus"
				elif model.endswith("OS2PLUS"):
					model = "ed_op2plus"
				elif model.endswith("OS3+"):
					model = "ed_force1plus"
				elif model.endswith("OS"):
					model = "optimussos"
				else:
					model = info["model"]
			elif ret_brand == "worldvision":
				if model == "Force1+":
					model = "wo_force1plus"
				elif model == "force1":
					model = "wo_force1"
				elif model == "force2solid":
					model = "wo_force2solid"
				elif model == "force2":
					model = "wo_force2solid"
				else:
					model = info["model"]
			elif ret_brand == "swiss":
				if model == "Force1+":
					model = "sw_force1plus"
				elif model == "force1":
					model = "sw_force1"
				else:
					model = info["model"]
			elif ret_brand == "xsarius":
				if model == "FUSION HD":
					model = "fusionhd"
				elif model == "FUSION HD SE":
					model = "fusionhdse"
				elif model == "PURE HD":
					model = "purehd"
				elif model == "SELF SAT":
					model = "selfsat"
				else:
					model = info["model"]
			elif ret_brand  == "iqon":
				if model == "Force1+":
					model = "iq_force1plus"
				elif model == "force1":
					model = "iq_force1"
				elif model == "force2":
					model = "iq_force2"
				elif model == "force2solid":
					model = "iq_force2"
				elif model == "force2plus":
					model = "iq_force2plus"
				elif model == "force2se":
					model = "iq_force2se"
				elif model == "force2nano":
					model = "iq_force2nano"
				elif model == "PURE HD":
					model = "purehd"
				elif model == "SELF SAT":
					model = "selfsat"
				elif model == "ios100hd":
					model = "iq_ios100"
				elif model == "ios200hd":
					model = "iq_ios200"
				elif model == "ios300hd":
					model = "iq_ios300"
				elif model == "ios300newhd":
					mdoel = "iq_ios300new"
				else:
					model = info["model"]
			else:
				model = info["model"]
		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
コード例 #34
0
ファイル: ajax.py プロジェクト: sklnet/e2openplugin-OpenWebif
 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 == "et4000":
         model = "et4x00"
     elif model == "xp1000":
         model = "xp1000"
     elif model == "xp1000s":
         model = "sf8"
     elif model == "odinm9":
         model = "odinm9"
     elif model == "odinm7":
         model = "odinm7"
     elif model == "e3hd":
         model = "e3hd"
     elif getBoxType() == "odinm6":
         model = "starsatlx"
     elif getMachineName() == "AX-Odin":
         model = "axodin"
     elif model == "MixOs F5":
         model = "ebox5000"
     elif model == "MixOs F5mini":
         model = "ebox5100"
     elif model == "MixOs F7":
         model = "ebox7358"
     elif model == "IOS-100HD":
         model = "ios100hd"
     elif model == "IOS-200HD":
         model = "ios200hd"
     elif model == "IOS-300HD":
         model = "ios300hd"
     elif model == "Optimuss-OS1":
         model = "optimussos1"
     elif model == "Optimuss-OS2":
         model = "optimussos2"
     elif model == "TM-TWIN-OE":
         model = "tmtwin"
     elif model == "TM-2T-OE":
         model = "tm2t"
     elif model == "TM-SINGLE":
         model = "tmsingle"
     elif model == "TM-NANO-OE":
         model = "tmnano"
     elif getBoxType() == "ixusssone":
         model = "ixussone"
     elif getBoxType() == "ixussduo":
         model = "ixussduo"
     elif getBoxType() == "ixusszero":
         model = "ixusszero"
     elif model == "Premium Twin":
         model = "ini-5000sv"
     elif model == "Premium Mini":
         model = "ini-1000sv"
     elif model == "Xpeed LX":
         if fileExists("/proc/stb/fp/version"):
             file = open("/proc/stb/fp/version")
             version = file.read().strip().lower()
             file.close()
         if version.startswith("2"):
             model = "xpeedlx2"
         else:
             model = "xpeedlx1"
     elif model == "Xpeed LX3":
         model = "xpeedlx3"
     elif model == "Sezam 1000-HD":
         model = "sezam-1000"
     elif model == "Sezam 5000-HD":
         model = "sezam-5000"
     elif model == "Sezam 1000-HD":
         model = "sezam-9000"
     if fileExists(getPublicPath("/images/boxes/" + model + ".jpg")):
         info["boximage"] = model + ".jpg"
     else:
         info["boximage"] = "unknown.jpg"
     return info
コード例 #35
0
ファイル: base.py プロジェクト: HDMU/e2openplugin-OpenWebif
	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
		from Components.config import config
		if hasattr(eEPGCache, 'FULL_DESCRIPTION_SEARCH'):
			ret['epgsearchcaps'] = True
		else:
			ret['epgsearchcaps'] = False
		extras = []
		extras.append({ 'key': 'ajax/settings','description': _("Settings")})
		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])

		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") , '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
			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

		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"]:
					try:
						extras.append({ 'key': plugins[0], 'description': plugins[2] , 'nw':'2'})
					except KeyError:
						pass
		except ImportError:
			pass

		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
コード例 #36
0
	def P_boxinfo(self, request):
		info = getInfo()
		model = info["model"]
		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", "")
		if fileExists("/etc/.brandtype"):
			ret_brand = open("/etc/.brandtype").read().strip().lower()
			print "@@@@@ [model] @@@@@", model
			if ret_brand == "technomate":
				if model == "TM-NANO-3T COMBO":
					model = "te_force1plus"
				elif model == "tmnano2super":
					model = "te_tmnano2super"
				else:
					model = info["model"]
			elif ret_brand == "edision":
				if model.endswith("OS1"):
					model = "optimussos1"
				elif model.endswith("OS2"):
					model = "optimussos2"
				elif model.endswith("OS1PLUS"):
					model = "ed_op1plus"
				elif model.endswith("OS2PLUS"):
					model = "ed_op2plus"
				elif model.endswith("OS3+"):
					model = "ed_force1plus"
				else:
					model = info["model"]
			elif ret_brand == "worldvision":
				if model == "Force1+":
					model = "wo_force1plus"
				elif model == "force1":
					model = "wo_force1"
				else:
					model = info["model"]
			elif ret_brand == "swiss":
				if model == "Force1+":
					model = "sw_force1plus"
				elif model == "force1":
					model = "sw_force1"
				else:
					model = info["model"]
			elif ret_brand  == "iqon":
				if model == "Force1+":
					model = "iq_force1plus"
				elif model == "force1":
					model = "iq_force1"
				else:
					model = info["model"]
			else:
				model = info["model"]
		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
コード例 #37
0
 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 == "et4000":
         model = "et4x00"
     elif model == "xp1000":
         model = "xp1000"
     elif model == "xp1000s":
         model = "sf8"
     elif model == "odinm9":
         model = "odinm9"
     elif model == "odinm7":
         model = "odinm7"
     elif model == "e3hd":
         model = "e3hd"
     elif getBoxType() == 'odinm6':
         model = "starsatlx"
     elif getMachineName() == 'AX-Odin':
         model = "axodin"
     elif model == "MixOs F5":
         model = "ebox5000"
     elif model == "MixOs F5mini":
         model = "ebox5100"
     elif model == "MixOs F7":
         model = "ebox7358"
     elif model == "IOS-100HD":
         model = "ios100hd"
     elif model == "IOS-200HD":
         model = "ios200hd"
     elif model == "IOS-300HD":
         model = "ios300hd"
     elif model == "Optimuss-OS1":
         model = "optimussos1"
     elif model == "Optimuss-OS2":
         model = "optimussos2"
     elif model == "TM-TWIN-OE":
         model = "tmtwin"
     elif model == "TM-2T-OE":
         model = "tm2t"
     elif model == "TM-SINGLE":
         model = "tmsingle"
     elif model == "TM-NANO-OE":
         model = "tmnano"
     elif getBoxType() == 'ixussone':
         model = "ixussone"
     elif getBoxType() == 'ixussduo':
         model = "ixussduo"
     elif getBoxType() == 'ixusszero':
         model = "ixusszero"
     elif model == 'Premium Twin':
         model = "ini-5000sv"
     elif model == 'Premium Mini':
         model = "ini-1000sv"
     elif model == 'Xpeed LX':
         if fileExists("/proc/stb/fp/version"):
             file = open("/proc/stb/fp/version")
             version = file.read().strip().lower()
             file.close()
         if version.startswith('2'):
             model = "xpeedlx2"
         else:
             model = "xpeedlx1"
     elif model == 'Xpeed LX3':
         model = "xpeedlx3"
     elif model == 'Sezam 1000-HD':
         model = "sezam-1000"
     elif model == 'Sezam 5000-HD':
         model = "sezam-5000"
     elif model == 'Sezam 1000-HD':
         model = "sezam-9000"
     elif model == 'Sogno 8800HD':
         model = "sogno8800hd"
     elif model == 'ENfinity':
         model = "enfinity"
     elif getBoxType() == 'gb800solo':
         model = "gb800solo"
     elif getBoxType() == 'gb800se':
         model = "gb800se"
     elif getBoxType() == 'gb800ue':
         model = "gb800ue"
     elif getBoxType() == 'gb800seplus':
         model = "gb800seplus"
     elif getBoxType() == 'gb800ueplus':
         model = "gb800ueplus"
     elif getBoxType() == 'gbquad':
         model = "gbquad"
     elif getBoxType() == 'gbquadplus':
         model = "gbquadplus"
     if fileExists(getPublicPath("/images/boxes/" + model + ".jpg")):
         info["boximage"] = model + ".jpg"
     else:
         info["boximage"] = "unknown.jpg"
     return info