Browse Source

add comment about ps3 not supporting streaming...

[git-p4: depot-paths = "//depot/": change = 1215]
replace/b43bf02ddeddd088c0e6b94974ca1a46562eb3db
John-Mark Gurney 16 years ago
parent
commit
a8ba9dfe93
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      shoutcast.py

+ 7
- 2
shoutcast.py View File

@@ -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



Loading…
Cancel
Save