gmyth-stream/server/0.3/lib/request_handler.py
branchtrunk
changeset 741 ffc7212656a5
parent 736 1bc4c47e4ad8
child 742 fe8ddffd7f5c
     1.1 --- a/gmyth-stream/server/0.3/lib/request_handler.py	Fri Jun 01 13:48:21 2007 +0100
     1.2 +++ b/gmyth-stream/server/0.3/lib/request_handler.py	Fri Jun 01 19:41:45 2007 +0100
     1.3 @@ -206,15 +206,23 @@
     1.4  
     1.5          if body:
     1.6              tl = self.server.get_transcoders()
     1.7 -            if not tl and not self.query.get("tid", None):
     1.8 +            if not tl and not self.query.get("tid", None) and \
     1.9 +                   not self.query.get("running", None):
    1.10                  running = "<p>No running transcoder.</p>\n"
    1.11  
    1.12 -            elif self.query.get("tid", None) and not tl:
    1.13 +            elif not tl and self.query.get("tid", None):
    1.14                  tids = self.query.get("tid")
    1.15                  for tid in tids:
    1.16                      stat = self.transcoders_log.get_status(int(tid))
    1.17                      self.wfile.write("%s<br>" % stat)
    1.18  
    1.19 +            elif self.query.get("running", None):
    1.20 +                for transcoder, request in tl:
    1.21 +                    outf = transcoder.params_first("outfile")
    1.22 +                    tid = transcoder.tid
    1.23 +                    self.wfile.write("%s:%s<br>" % (tid, outf))
    1.24 +                return True
    1.25 +
    1.26              elif self.query.get("tid", None):
    1.27                  req_tid = self.query.get("tid")
    1.28                  for transcoder, request in tl: