Date: Fri, 27 Apr 2012 20:45:43 GMT From: John Hixson <john@pcbsd.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/167377: patch pithos to work with pandora v34 Message-ID: <201204272045.q3RKjhCT091963@red.freebsd.org> Resent-Message-ID: <201204272050.q3RKo8hr077323@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 167377 >Category: ports >Synopsis: patch pithos to work with pandora v34 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Apr 27 20:50:08 UTC 2012 >Closed-Date: >Last-Modified: >Originator: John Hixson >Release: 10.0-CURRENT >Organization: iXsystems >Environment: FreeBSD thinkbsd 9.9-CURRENT FreeBSD 10.0-CURRENT #24: Tue Apr 17 19:09:03 PDT 2012 john@thinkbsd:/usr/obj/usr/src/sys/THINKBSD amd64 >Description: >How-To-Repeat: >Fix: Patch attached with submission follows: diff -urN pithos/files/patch-pandora.py pithos/files/patch-pandora.py --- pithos/files/patch-pandora.py 1969-12-31 16:00:00.000000000 -0800 +++ pithos/files/patch-pandora.py 2012-04-27 13:42:11.000000000 -0700 @@ -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'] >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204272045.q3RKjhCT091963>