# HG changeset patch # User morphbr # Date 1179407247 -3600 # Node ID 367d791aeb574ad2631cd8fadacd4f0d018e0922 # Parent 1d488185037f99eea80285b1c9b832cb3ee8a799 [svn r688] * GMyth-Streamer - Bug in server_status (list more than one transcode) diff -r 1d488185037f -r 367d791aeb57 gmyth-stream/server/0.2/lib/server.py --- a/gmyth-stream/server/0.2/lib/server.py Wed May 16 23:55:23 2007 +0100 +++ b/gmyth-stream/server/0.2/lib/server.py Thu May 17 14:07:27 2007 +0100 @@ -138,10 +138,6 @@ return ret # _nav_items() - def _create_html_item(self, opt): - return "
  • %s
  • \n" % opt - # _create_html_item - def serve_main(self, body): self.send_response(200) self.send_header("Content-Type", "text/html") @@ -234,13 +230,13 @@ self.send_header("Content-Type", "text/html") self.send_header('Connection', 'close') self.end_headers() + stopone = "" if body: tl = self.server.get_transcoders() if not tl: running = "

    No running transcoder.

    \n" stopall = "" - stopone = "" elif self.query.get("ip") and self.query.get("file"): for transcoder, request in tl: @@ -254,14 +250,15 @@ else: running = "

    Running transcoders:

    \n" - stopall = self._create_html_item("" + stopall = utils._create_html_item("" "[STOP ALL]" % self.menu["Stop"]) for transcoder, request in tl: - stopone = self._create_html_item("%s: %s:%s" - "[STOP] - Status: %s%%"\ + stopone += utils._create_html_item("%s: %s:%s" + "[STOP] - " + "Status: %s%%"\ % ( transcoder, request.client_address[0], request.client_address[1], @@ -269,11 +266,11 @@ request.client_address[1], transcoder.status) ) - self.wfile.write(utils.getHTML("status", - {"menu": self._nav_items(), - "running": running, - "stopall": stopall, - "stopone": stopone})) + self.wfile.write(utils.getHTML("status", + {"menu": self._nav_items(), + "running": running, + "stopall": stopall, + "stopone": stopone})) # serve_status() diff -r 1d488185037f -r 367d791aeb57 gmyth-stream/server/0.2/lib/utils.py --- a/gmyth-stream/server/0.2/lib/utils.py Wed May 16 23:55:23 2007 +0100 +++ b/gmyth-stream/server/0.2/lib/utils.py Thu May 17 14:07:27 2007 +0100 @@ -160,6 +160,10 @@ # getHTML +def _create_html_item(opt): + return "
  • %s
  • \n" % opt +# _create_html_item + def progress_bar(log, value, max, barsize): chars = int(value * barsize / float(max)) percent = int((value / float(max)) * 100) diff -r 1d488185037f -r 367d791aeb57 gmyth-stream/server/0.2/plugins/transcoders/mencoder_lib/mythtv.py --- a/gmyth-stream/server/0.2/plugins/transcoders/mencoder_lib/mythtv.py Wed May 16 23:55:23 2007 +0100 +++ b/gmyth-stream/server/0.2/plugins/transcoders/mencoder_lib/mythtv.py Thu May 17 14:07:27 2007 +0100 @@ -24,8 +24,6 @@ gmyth_dict["backend"] = _args[0] gmyth_dict["port"] = _args[1].split("/", 1)[0] - self.log.debug("aqui 2 %s" % _args) - _tmp_file = _args[1].split("/", 1)[1] if _tmp_file.find("channel") >= 0: