Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

v34 workaround: Get sync time from JJZ's server. Patch by James Burton.

Bug: lp:988395
  • Loading branch information...
commit 049a0360c92ce6760696cef3a3732d57c95ae75c 1 parent e619141
@kevinmehall kevinmehall authored
Showing with 7 additions and 5 deletions.
  1. +7 −5 pithos/pandora/pandora.py
View
12 pithos/pandora/pandora.py
@@ -21,7 +21,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
@@ -169,13 +169,15 @@ def connect(self, user, password):
self.rid = "%07iP"%(int(time.time()) % 10000000)
self.listenerId = self.authToken = None
- pandora_time = self.xmlrpc_call('misc.sync', [], [], secure=True, includeTime=False)
- logging.info("Pandora sync reply is %s", pandora_decrypt(pandora_time))
- pandora_time = int(pandora_decrypt(pandora_time)[4:14])
+ 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)
+
self.time_offset = pandora_time - time.time()
logging.info("Time offset is %s", self.time_offset)
- 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']
Please sign in to comment.
Something went wrong with that request. Please try again.