Exemplo n.º 1
0
	def render(self, request):
		request.setResponseCode(http.OK)
		request.setHeader('Content-type', 'application/xhtml+xml')
		request.setHeader('charset', 'UTF-8')

		try:
			from Plugins.Extensions.EPGRefresh.EPGRefresh import epgrefresh
			return six.ensure_binary(''.join(epgrefresh.buildConfiguration(webif=True)))
		except ImportError:
			return b'<?xml version="1.0" encoding="UTF-8" ?><e2simplexmlresult><e2state>false</e2state><e2statetext>EPG Refresh Plugin not found</e2statetext></e2simplexmlresult>'
Exemplo n.º 2
0
	def render(self, request):
		request.setResponseCode(http.OK)
		request.setHeader('Content-type', 'application/xhtml+xml')
		request.setHeader('charset', 'UTF-8')

		try:
			from Plugins.Extensions.EPGRefresh.EPGRefresh import epgrefresh
			return ''.join(epgrefresh.buildConfiguration(webif=True))
		except ImportError:
			return '<?xml version="1.0" encoding="UTF-8" ?><e2simplexmlresult><e2state>false</e2state><e2statetext>EPG Refresh Plugin not found</e2statetext></e2simplexmlresult>'