Browse Source

drop some debugging now that this seems to be working..

[git-p4: depot-paths = "//depot/": change = 846]
v0.3
John-Mark Gurney 19 years ago
parent
commit
074483d739
1 changed files with 1 additions and 10 deletions
  1. +1
    -10
      shoutcast.py

+ 1
- 10
shoutcast.py View File

@@ -101,7 +101,6 @@ class ShoutTransfer(shoutcast.ShoutcastClient):
shoutcast.ShoutcastClient.__init__(self)
self.request = request
self.passback = passback
log.msg('ShoutTransfer:', `request`, `passback`)
request.registerProducer(self, 1)

def connectionLost(self, reason):
@@ -121,7 +120,6 @@ class ShoutTransfer(shoutcast.ShoutcastClient):
pass

def stopProducing(self):
log.msg('stopProducing:', `self.request`, `self.passback`)
shoutcast.ShoutcastClient.stopProducing(self)
self.request = None
self.passback = None
@@ -179,7 +177,6 @@ class ShoutProxy(resource.Resource):
def startNextConnection(self, request):
url = self.urls[self.urlpos]
self.urlpos = (self.urlpos + 1) % len(self.urls)
log.msg('starting transfer for:', `url`)
scheme, host, port, path = _parse(url)
protocol.ClientCreator(reactor, ShoutTransfer, request,
self.startNextConnection).connectTCP(host, port)
@@ -197,23 +194,19 @@ class ShoutProxy(resource.Resource):
self.urls.append(pls.get(PLSsection,
'File%d' % i))
self.urlpos = random.randrange(len(self.urls))
log.msg('urls:', `self.urls`, 'urlpos:', self.urlpos)
except:
self.dump_exc()
return

log.msg('waking up reqests')
self.afterurls.callback('foo')
self.afterurls.callback(None)
self.afterurls = None

def errPLS(self, failure):
log.msg('errPLS:', `failure`)
self.request.write(failure.render(self.request))
self.request.finish()
self.request = None

def processRequest(self, ign, request):
log.msg('processRequest:', `request`)
self.startNextConnection(request)

def render(self, request):
@@ -232,7 +225,6 @@ class ShoutProxy(resource.Resource):
if not self.fetchingurls:
# Get the PLS
self.fetchingurls = True
log.msg('starting page fetch:', `self.shoutpls`)
# Not really sure if ascii is the correct one,
# shouldn't getPage do proper escaping for me?
getPage(self.shoutpls.encode('ascii')) \
@@ -335,7 +327,6 @@ class ShoutGenre(MusicGenre):

class ShoutCast(Container):
def __init__(self, *args, **kwargs):
log.msg('shoutcast created')
Container.__init__(self, *args, **kwargs)

self.genres = GenreFeedAsync()


||||||
x
 
000:0
Loading…
Cancel
Save