From a8ba9dfe9338436c61a54fc9ceb6e1a28c8d7ab8 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Tue, 28 Oct 2008 23:21:26 -0800 Subject: [PATCH] add comment about ps3 not supporting streaming... [git-p4: depot-paths = "//depot/": change = 1215] --- shoutcast.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/shoutcast.py b/shoutcast.py index 12cf51c..bb423ce 100644 --- a/shoutcast.py +++ b/shoutcast.py @@ -117,6 +117,7 @@ class ShoutTransfer(shoutcast.ShoutcastClient): request.registerProducer(self, 1) def connectionLost(self, reason): + #traceback.print_stack() log.msg('connectionLost:', `self.request`, `self.passback`) shoutcast.ShoutcastClient.connectionLost(self, reason) if self.request: @@ -193,6 +194,7 @@ class ShoutProxy(resource.Resource): url = self.urls[self.urlpos] self.urlpos = (self.urlpos + 1) % len(self.urls) scheme, host, port, path = _parse(url) + #print `url` protocol.ClientCreator(reactor, ShoutTransfer, request, self.startNextConnection).connectTCP(host, port) @@ -236,6 +238,9 @@ class ShoutProxy(resource.Resource): def render(self, request): request.setHeader('content-type', self.mt) + # XXX - PS3 doesn't support streaming, this makes it think + # that is has data, but it needs to d/l the entire thing. + #request.setHeader('content-length', 1*1024*1024) if request.method == 'HEAD': return '' @@ -343,8 +348,8 @@ class ShoutGenre(MusicGenre): doupdate = True self.pathObjmap[name] = self.cd.addItem(self.id, - ShoutStation, '%sk-%s' % (i['Bitrate'], name), - station = i) + ShoutStation, '%sk-%s' % (i['Bitrate'], name), + station = i) self.sl = stations