1 from Plugins.Plugin import PluginDescriptor
3 from enigma import eEnv
4 from Plugins.Extensions.WebInterface.WebChilds.Toplevel import addExternalChild
5 from WebChilds.ScreenPageCORS import ScreenPageCORS
7 from twisted.web import static
8 from twisted.python import util
10 from Plugins.Extensions.StreamServerSeek.StreamServerSeek import StreamServerSeek
11 from WebChilds.Stream import StreamResource
12 from WebChilds.Proxy import ProxyResource
14 if hasattr(static.File, 'render_GET'):
15 class File(static.File):
16 def render_POST(self, request):
17 return self.render_GET(request)
21 def autostart(reason,**kwargs):
22 if "session" in kwargs:
23 sss = StreamServerSeek(session = kwargs["session"])
24 print "session %s" % sss
26 root = File(eEnv.resolve("${libdir}/enigma2/python/Plugins/Extensions/StreamServerSeek/web-data"))
27 root.putChild("web", ScreenPageCORS(kwargs["session"], util.sibpath(__file__, "web"), True) )
28 root.putChild("stream", StreamResource(kwargs["session"]))
29 root.putChild("proxy", ProxyResource(kwargs["session"]))
30 addExternalChild( ("streamserverseek", root) )
32 def Plugins(**kwargs):
33 return [PluginDescriptor(where = [PluginDescriptor.WHERE_SESSIONSTART], fnc = autostart)]