1.1 --- a/gmyth-stream/server/0.2/lib/server.py Wed May 16 23:55:23 2007 +0100
1.2 +++ b/gmyth-stream/server/0.2/lib/server.py Thu May 17 14:07:27 2007 +0100
1.3 @@ -138,10 +138,6 @@
1.4 return ret
1.5 # _nav_items()
1.6
1.7 - def _create_html_item(self, opt):
1.8 - return "<li>%s</li>\n" % opt
1.9 - # _create_html_item
1.10 -
1.11 def serve_main(self, body):
1.12 self.send_response(200)
1.13 self.send_header("Content-Type", "text/html")
1.14 @@ -234,13 +230,13 @@
1.15 self.send_header("Content-Type", "text/html")
1.16 self.send_header('Connection', 'close')
1.17 self.end_headers()
1.18 + stopone = ""
1.19
1.20 if body:
1.21 tl = self.server.get_transcoders()
1.22 if not tl:
1.23 running = "<p>No running transcoder.</p>\n"
1.24 stopall = ""
1.25 - stopone = ""
1.26
1.27 elif self.query.get("ip") and self.query.get("file"):
1.28 for transcoder, request in tl:
1.29 @@ -254,14 +250,15 @@
1.30
1.31 else:
1.32 running = "<p>Running transcoders:</p>\n"
1.33 - stopall = self._create_html_item("<a href='%s?request=all'>"
1.34 + stopall = utils._create_html_item("<a href='%s?request=all'>"
1.35 "[STOP ALL]</a>" %
1.36 self.menu["Stop"])
1.37
1.38 for transcoder, request in tl:
1.39 - stopone = self._create_html_item("%s: %s:%s<a href='%s?"
1.40 - "request=%s:%s'>"
1.41 - "[STOP]</a> - Status: %s%%"\
1.42 + stopone += utils._create_html_item("%s: %s:%s<a href='%s?"
1.43 + "request=%s:%s'>"
1.44 + "[STOP]</a> - "
1.45 + "Status: %s%%"\
1.46 % (
1.47 transcoder, request.client_address[0],
1.48 request.client_address[1],
1.49 @@ -269,11 +266,11 @@
1.50 request.client_address[1],
1.51 transcoder.status) )
1.52
1.53 - self.wfile.write(utils.getHTML("status",
1.54 - {"menu": self._nav_items(),
1.55 - "running": running,
1.56 - "stopall": stopall,
1.57 - "stopone": stopone}))
1.58 + self.wfile.write(utils.getHTML("status",
1.59 + {"menu": self._nav_items(),
1.60 + "running": running,
1.61 + "stopall": stopall,
1.62 + "stopone": stopone}))
1.63 # serve_status()
1.64
1.65
2.1 --- a/gmyth-stream/server/0.2/lib/utils.py Wed May 16 23:55:23 2007 +0100
2.2 +++ b/gmyth-stream/server/0.2/lib/utils.py Thu May 17 14:07:27 2007 +0100
2.3 @@ -160,6 +160,10 @@
2.4
2.5 # getHTML
2.6
2.7 +def _create_html_item(opt):
2.8 + return "<li>%s</li>\n" % opt
2.9 +# _create_html_item
2.10 +
2.11 def progress_bar(log, value, max, barsize):
2.12 chars = int(value * barsize / float(max))
2.13 percent = int((value / float(max)) * 100)
3.1 --- a/gmyth-stream/server/0.2/plugins/transcoders/mencoder_lib/mythtv.py Wed May 16 23:55:23 2007 +0100
3.2 +++ b/gmyth-stream/server/0.2/plugins/transcoders/mencoder_lib/mythtv.py Thu May 17 14:07:27 2007 +0100
3.3 @@ -24,8 +24,6 @@
3.4 gmyth_dict["backend"] = _args[0]
3.5 gmyth_dict["port"] = _args[1].split("/", 1)[0]
3.6
3.7 - self.log.debug("aqui 2 %s" % _args)
3.8 -
3.9 _tmp_file = _args[1].split("/", 1)[1]
3.10
3.11 if _tmp_file.find("channel") >= 0: