pretty basic (and also most likely final :-)) intergration with webif, open http...
authorMoritz Venn <ritzmo@users.schwerkraft.elitedvb.net>
Sun, 15 Mar 2009 21:08:12 +0000 (21:08 +0000)
committerMoritz Venn <ritzmo@users.schwerkraft.elitedvb.net>
Sun, 15 Mar 2009 21:08:12 +0000 (21:08 +0000)
configure.ac
epgrefresh/src/EPGRefreshResource.py [new file with mode: 0644]
epgrefresh/src/Makefile.am
epgrefresh/src/webinterface/EPGRefresh.py [new file with mode: 0644]
epgrefresh/src/webinterface/Makefile.am [new file with mode: 0755]

index 5c44604..51ecaf0 100644 (file)
@@ -97,6 +97,7 @@ autotimer/po/Makefile
 
 epgrefresh/Makefile
 epgrefresh/src/Makefile
+epgrefresh/src/webinterface/Makefile
 epgrefresh/po/Makefile
 
 werbezapper/Makefile
diff --git a/epgrefresh/src/EPGRefreshResource.py b/epgrefresh/src/EPGRefreshResource.py
new file mode 100644 (file)
index 0000000..12a33cf
--- /dev/null
@@ -0,0 +1,18 @@
+from twisted.web2 import resource, responsecode, http
+from EPGRefresh import epgrefresh
+
+# pretty basic resource which is just present to have a way to start a
+# forced refresh through the webif
+class EPGRefreshResource(resource.Resource):
+       def __init__(self):
+               resource.Resource.__init__(self)
+
+       def render(self, req):
+               if req.args.has_key("refresh"):
+                       # XXX: we assume we already know the session
+                       epgrefresh.forceRefresh()
+                       output = "initiated refresh"
+               else:
+                       output = "unknown command"
+               return http.Response(responsecode.OK ,stream = output)
+
index 3a2b6c1..2aa2539 100755 (executable)
@@ -1,4 +1,6 @@
 installdir = /usr/lib/enigma2/python/Plugins/Extensions/EPGRefresh\r
 \r
+SUBDIRS = webinterface\r
+\r
 install_PYTHON = *.py\r
 install_DATA = maintainer.info LICENSE\r
diff --git a/epgrefresh/src/webinterface/EPGRefresh.py b/epgrefresh/src/webinterface/EPGRefresh.py
new file mode 100644 (file)
index 0000000..a6d9ca2
--- /dev/null
@@ -0,0 +1,5 @@
+from Plugins.Extensions.WebInterface.WebChilds.Toplevel import addExternalChild
+from Plugins.Extensions.EPGRefresh.EPGRefreshResource import EPGRefreshResource
+
+addExternalChild( ("epgrefresh", EPGRefreshResource()) )
+
diff --git a/epgrefresh/src/webinterface/Makefile.am b/epgrefresh/src/webinterface/Makefile.am
new file mode 100755 (executable)
index 0000000..a669979
--- /dev/null
@@ -0,0 +1,3 @@
+installdir = /usr/lib/enigma2/python/Plugins/Extensions/WebInterface/WebChilds/External/
+
+install_PYTHON = *.py