Example #1
0
	def __init__(self, session, request):
		WebScreen.__init__(self, session, request)
		from Components.Sources.StaticText import StaticText
		from WebComponents.Sources.CurrentService import CurrentService
		from WebComponents.Sources.StreamServerSeekSource import StreamServerSeekSource
		from WebComponents.Sources.NaSource import NaSource
		from Plugins.Extensions.StreamServerSeek.StreamServerSeek import StreamServerSeek
		import os.path
		if os.path.isfile("/usr/lib/enigma2/python/Plugins/SystemPlugins/GstRtspServer/StreamServerControl.py"):
			from Plugins.SystemPlugins.GstRtspServer.StreamServerControl import streamServerControl
		else:
			from Components.StreamServerControl import streamServerControl
		from enigma import iServiceInformation, eServiceReference

		currentServiceSource = CurrentService(session)
		currentService = currentServiceSource.service
		
		self["State"] = StaticText(str(currentServiceSource.state))
		self["StateText"] = StaticText(currentServiceSource.statetext)

		naText = ""
		na = StaticText(naText)

		if currentService:
			self["CurrentService"] = currentServiceSource
			self["MoviePath"] = StaticText(eServiceReference(currentService.info().getInfoString(iServiceInformation.sServiceref)).getPath())
			if currentService.pause():
				self["Pausable"] = StaticText("1")
			else:
				self["Pausable"] = StaticText("0")
			if currentService.seek():
				self["Seekable"] = StaticText("1")
				self["Length"] = StreamServerSeekSource(session, StreamServerSeekSource.GET_LENGTH)
				self["PlayPosition"] = StreamServerSeekSource(session, StreamServerSeekSource.GET_PLAY_POSITION)
			else:
				self["Seekable"] = StaticText("0")
				self["Length"] = NaSource(naText)
				self["PlayPosition"] = NaSource(naText)
		else:
			self["CurrentService"] = currentServiceSource
			self["MoviePath"] = na
			self["Pausable"] = na
			self["Seekable"] = na
			self["Length"] = NaSource(naText)
			self["PlayPosition"] = NaSource(naText)
	def __init__(self, session, request):
		WebScreen.__init__(self, session, request)
		from WebComponents.Sources.CurrentService import CurrentService

		self["CurrentService"] = CurrentService(session)
		self["localip"] = RequestData(request, what=RequestData.HOST)
Example #3
0
 def __init__(self, session, request):
     WebScreen.__init__(self, session, request)
     from WebComponents.Sources.CurrentService import CurrentService
     self["CurrentService"] = CurrentService(session)