1.1 --- a/gmyth-stream/server/0.2/lib/server.py Tue May 08 21:01:03 2007 +0100
1.2 +++ b/gmyth-stream/server/0.2/lib/server.py Tue May 15 18:25:19 2007 +0100
1.3 @@ -63,12 +63,9 @@
1.4
1.5
1.6 def __str__(self):
1.7 - return '%s("%s", mux="%s", params=%s, addr=%s)' % \
1.8 + return '%s( params=%s )' % \
1.9 (self.__class__.__name__,
1.10 - self.params_first("uri", "None"),
1.11 - self.params_first("mux", "mpg"),
1.12 - self.params,
1.13 - repr(self))
1.14 + self.params)
1.15 # __str__()
1.16 # Transcoder
1.17
1.18 @@ -244,16 +241,32 @@
1.19 running = "<p>No running transcoder.</p>\n"
1.20 stopall = ""
1.21 stopone = ""
1.22 +
1.23 + elif self.query.get("ip") and self.query.get("file"):
1.24 + for transcoder, request in tl:
1.25 + filename = "%s" % self.query.get("file")[0]
1.26 + tfilename = "%s" % transcoder.params_first("uri")
1.27 +
1.28 + if tfilename.find(filename) >= 0 and \
1.29 + request.client_address[0] == self.query.get("ip")[0]:
1.30 + self.wfile.write("Status: %s %%" % transcoder.status)
1.31 + return
1.32 +
1.33 else:
1.34 running = "<p>Running transcoders:</p>\n"
1.35 - stopall = self._create_html_item("<a href='%s?request=all'>[STOP ALL]</a>" %
1.36 + stopall = self._create_html_item("<a href='%s?request=all'>"
1.37 + "[STOP ALL]</a>" %
1.38 self.menu["Stop"])
1.39
1.40 for transcoder, request in tl:
1.41 - stopone = self._create_html_item("%s: %s:%s<a href='%s?request=%s:%s'>"
1.42 - "[STOP]</a> - Status: %s%%" % (
1.43 - transcoder, request.client_address[0], request.client_address[1],
1.44 - self.menu["Stop"], request.client_address[0], request.client_address[1],
1.45 + stopone = self._create_html_item("%s: %s:%s<a href='%s?"
1.46 + "request=%s:%s'>"
1.47 + "[STOP]</a> - Status: %s%%"\
1.48 + % (
1.49 + transcoder, request.client_address[0],
1.50 + request.client_address[1],
1.51 + self.menu["Stop"], request.client_address[0],
1.52 + request.client_address[1],
1.53 transcoder.status) )
1.54
1.55 self.wfile.write(utils.getHTML("status",