aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2012-04-28 05:02:43 +0800
committerdelphij <delphij@FreeBSD.org>2012-04-28 05:02:43 +0800
commit53ae26808668858b7a9af7e578e3b071cf8ead7f (patch)
tree33f0cf8dd5fd7495f5def6816ce705952a30b760 /audio
parent109a8eb5e3b37b9c461e1de497c55e80e0f8cd85 (diff)
downloadfreebsd-ports-gnome-53ae26808668858b7a9af7e578e3b071cf8ead7f.tar.gz
freebsd-ports-gnome-53ae26808668858b7a9af7e578e3b071cf8ead7f.tar.zst
freebsd-ports-gnome-53ae26808668858b7a9af7e578e3b071cf8ead7f.zip
patch pithos to work with pandora v34.
PR: ports/167377 Submitted by: John Hixson (maintainer)
Diffstat (limited to 'audio')
-rw-r--r--audio/pithos/Makefile1
-rw-r--r--audio/pithos/files/patch-pandora.py31
2 files changed, 32 insertions, 0 deletions
diff --git a/audio/pithos/Makefile b/audio/pithos/Makefile
index b9c9d2339031..e8df8191a17a 100644
--- a/audio/pithos/Makefile
+++ b/audio/pithos/Makefile
@@ -7,6 +7,7 @@
PORTNAME= pithos
PORTVERSION= 0.3.14
+PORTREVISION= 1
CATEGORIES= audio
MASTER_SITES= DEBIAN
DISTNAME= ${PORTNAME}_${PORTVERSION}.orig
diff --git a/audio/pithos/files/patch-pandora.py b/audio/pithos/files/patch-pandora.py
new file mode 100644
index 000000000000..5bc7e3816d6f
--- /dev/null
+++ b/audio/pithos/files/patch-pandora.py
@@ -0,0 +1,31 @@
+--- pithos/pandora/pandora.py.orig 2011-12-14 16:33:47.000000000 -0800
++++ pithos/pandora/pandora.py 2012-04-27 13:41:25.000000000 -0700
+@@ -22,7 +22,7 @@
+ from pithos.pandora.xmlrpc import *
+ from pithos.pandora.blowfish import Blowfish
+
+-PROTOCOL_VERSION = "33"
++PROTOCOL_VERSION = "34"
+ RPC_URL = "www.pandora.com/radio/xmlrpc/v"+PROTOCOL_VERSION+"?"
+ USER_AGENT = "Mozilla/5.0 (X11; U; Linux i586; de; rv:5.0) Gecko/20100101 Firefox/5.0 (compatible; Pithos/0.3)"
+ HTTP_TIMEOUT = 30
+@@ -161,12 +161,16 @@
+ def connect(self, user, password):
+ self.rid = "%07iP"%(int(time.time()) % 10000000)
+ self.listenerId = self.authToken = None
++
++ logging.info("Attempting to connect...");
++ timeurl = urllib2.urlopen("http://ridetheclown.com/s2/synctime.php");
++ pandora_time=int(timeurl.read(),10);
++ logging.info("Synctime is %s", pandora_time)
+
+- pandora_time = self.xmlrpc_call('misc.sync', [], [], secure=True, includeTime=False)
+- pandora_time = int(re.sub(r"\D", "", pandora_decrypt(pandora_time)))
+ self.time_offset = pandora_time - time.time()
+
+- user = self.xmlrpc_call('listener.authenticateListener', [user, password], [], secure=True)
++ user = self.xmlrpc_call('listener.authenticateListener', ["",user, password,"html5tuner","","","HTML5",True], [], secure=True)
++
+
+ self.webAuthToken = user['webAuthToken']
+ self.listenerId = user['listenerId'] \ No newline at end of file