1 from twisted.web2 import resource, responsecode, http
2 from EPGRefresh import epgrefresh
4 # pretty basic resource which is just present to have a way to start a
5 # forced refresh through the webif
6 class EPGRefreshResource(resource.Resource):
8 resource.Resource.__init__(self)
10 def render(self, req):
11 if req.args.has_key("refresh"):
12 # XXX: we assume we already know the session
13 epgrefresh.forceRefresh()
14 output = "initiated refresh"
16 output = "unknown command"
17 return http.Response(responsecode.OK ,stream = output)