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) shoutcast.ShoutcastClient.__init__(self)
self.request = request self.request = request
self.passback = passback self.passback = passback
log.msg('ShoutTransfer:', `request`, `passback`)
request.registerProducer(self, 1) request.registerProducer(self, 1)


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


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


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


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


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


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


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


self.genres = GenreFeedAsync() self.genres = GenreFeedAsync()


Loading…
Cancel
Save