From a12b78c5d8c474a429013be3bc20c5e207b0c6ad Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Fri, 7 Nov 2008 01:13:25 -0800 Subject: [PATCH] fix streaming of shoutcast to the DSM-520.. [git-p4: depot-paths = "//depot/": change = 1224] --- README | 2 ++ shoutcast.py | 1 + 2 files changed, 3 insertions(+) diff --git a/README b/README index aad1d51..ccf0309 100644 --- a/README +++ b/README @@ -101,6 +101,8 @@ v0.x: Support both / and \ as path separators in ZipStorage. RarFile uses a \ while tar uses /. We count the number of each and use the most common. + For ShoutCast streams, override the User-Agent, apparently some/most + stations now block the default one. v0.3: Include some patches for twisted in the distro, in the directory diff --git a/shoutcast.py b/shoutcast.py index bb423ce..762fa2f 100644 --- a/shoutcast.py +++ b/shoutcast.py @@ -110,6 +110,7 @@ class ShoutcastFeedAsync(feeds.ShoutcastFeed): threadable.synchronize(ShoutcastFeedAsync) class ShoutTransfer(shoutcast.ShoutcastClient): + userAgent = 'because you block user-agents' def __init__(self, request, passback): shoutcast.ShoutcastClient.__init__(self) self.request = request