Comment 8 for bug 988395

Revision history for this message
Kevin Mehall (kevin-mehall) wrote :

I've merged James Burton's patch as a temporary fix, but I agree with Reed that it is not a permanent solution. ZigZagJoe's synctime.php is just a constant (manually set) offset from time(). It changes rarely, but that's another point of failure. It would also break if Pandora begins to validate the sync token passed to authenticateListener. I do not plan to use this code in a release, but it's on GitHub as an option for people who want Pithos to work right now.

Regarding the Metro Pandora implementation, the sync tokens stay valid for only about 48 hours. I captured a token immediately after the API change, and it no longer works.

The longer term solution is something more like Christopher's implementation of the JSON API from the WebOS client. That seems to be the direction pianobar is going as well. We'll need to do more work to get that API up to the functionality and stability of the XMLRPC API, however.

I'm also considering a more radical change -- wrapping the official HTML5 client in webkit. Pithos would become an adapter that passes events like media keys and sound menu clicks into the HTML5 client and extracts data such as the current song and play/pause state to send to the sound menu and notification daemon. The HTML5 client no longer requires Flash, and its user interface isn't bad. The UI is non-native, but is more complete and elegant than the existing Pithos UI. We could use greasemonkey-style javascript injection to tweak the UI as necessary.