Kodi Community Forum
[OBSOLETE] Pandora Radio (Script) Music Addon - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Music Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=148)
+---- Thread: [OBSOLETE] Pandora Radio (Script) Music Addon (/showthread.php?tid=70471)



- htpc guy - 2010-11-06

umm...bummer. Mine won't accept my username and password either. Hopefully there will be a fix soon.


Have we seen this before? - kaisjam - 2010-11-06

tslayer Wrote:Okay.. I got it working.

3 things needed:

1) Upgrade the version to 28 as previously mentioned.
2) Copy in the newer crypt keys
3) Modify pianoparser.py and change line 28 from: b = a.split( "}, {" ) to b = a.split( "},{" ) Notice the removal of a space (due to removal of space in the new crypt keys).

Those three changes allows it to work again.

Enjoy.

The change yesterday looks a lot like last time...

There's a protocol bump to 29 (that's line 7 in libpandora/pandora.py).
There's new crypt keys.

But that's not all...

The spaces that were removed in the previous key files are back. But not everywhere. So you can either revert the change to pianoparser.py quoted above and add two spaces to lines 173 and 238 of crypt_key_input.h, or delete the spaces in between the key groups in both files. That is, go from }, { to },{ for each. I opted for the former as I already futz'd with pianoparser.py.

It now works for me!

I know nothing of python, so I have no idea how to make the parser code resilient to this. Anyone care to suggest anything?


- htpc guy - 2010-11-06

Thanks a ton kaisjam.

Just to make this clear for everyone else. (and so you don't have to search around for everything. Hope I'm not stepping on your toes kaisjam)

1) copy new crypt_key_input and crypt_key_output from: https://github.com/PromyLOPh/pianobar/tree/master/libpiano/src/

2) open script.xbmc.pandora/libpandora/pandora.py
change line 7 to: PROTOCOL_VERSION=29

3) open script.xbmc.pandora/libpandora/pianoparser.py
change line 28 to: b = a.split( "}, {" )

4) open script.xbmc.pandora/crypt_key_input.h
change line 173 to: }, {
change line 238 to: }, {

5) open xbmc, navigate to your pandora app and enjoy.

All credit goes to Kaisjam


- maruchan - 2010-11-06

kaisjam Wrote:I know nothing of python, so I have no idea how to make the parser code resilient to this. Anyone care to suggest anything?

I'm completely unfamiliar with how Pandora works and the addon's code, but it should be easy to add in checks to make sure each of the problematic steps completes successfully. For instance, if it switches between b = a.split( "}, {" ) and b = a.split( "},{" ), it should be simple enough to check the length of the array (b) and if it's 0 try it using the other delimiter.

Also, have the addon periodically grab the latest crypt_key_* files from the internet when launched and perhaps auto-increment the version number if a failure is detected.


- htpc guy - 2010-11-07

maruchan Wrote:I'm completely unfamiliar with how Pandora works and the addon's code, but it should be easy to add in checks to make sure each of the problematic steps completes successfully. For instance, if it switches between b = a.split( "}, {" ) and b = a.split( "},{" ), it should be simple enough to check the length of the array (b) and if it's 0 try it using the other delimiter.

Also, have the addon periodically grab the latest crypt_key_* files from the internet when launched and perhaps auto-increment the version number if a failure is detected.

Sounds reasonable enough to me. Too bad I don't know any python.


RE: [OBSOLETE] Pandora Radio (Script) Music Addon - Thunder- - 2010-11-07

..


- maruchan - 2010-11-07

Dunno how just using regular expressions slipped my mind, but that does indeed work Smile I'll try looking through the addon's code and see if I can find an easy way to make this self-sustaining. My basic idea is:

Use Thunder-'s regex to handle differences in the delimiter; store PROTOCOL_VERSION as a setting (hidden from the user) rather than a hard-coded value. The addon gets this on launch and continues if all goes well, but if it encounters an 'XmlRpcException' about the protocol version, it downloads a new copy of the crypt_key_* files and increments the PROTOCOL_VERSION by one.


- Jopplehead - 2010-11-07

Thanks Sooo much "Kaisjam" for the quick fix! I will give it a try and see if it works for me also Smile


- Jopplehead - 2010-11-07

Just tried the fix and it works great for me too. THX!


- spbogie - 2010-11-07

It's currently nearly 3AM here (after a DST change so really 4AM on any other night) and I'm really in no condition to be messing with the code right now, but I'll try and get a fix pushed to the main repo in the next day or two here.


- kaisjam - 2010-11-07

htpc guy Wrote:Just to make this clear for everyone else. (and so you don't have to search around for everything. Hope I'm not stepping on your toes kaisjam)

Ha... No worries. Documentation was never my strong suit. Big Grin


Trouble: Script failed!: script.xbmc.pandora - mstng_67 - 2010-11-11

isamu.dragon Wrote:Here is the latest working version of Pandora (From My Personal install).
http://www.mediafire.com/?5b1cpdck2n8qbg2
Just put in addons folder and it will work

no need for using the place in skins folder

I extracted the contents of the zip to ~/.XBMC/scripts. Started XBMC. Attempted to run the script. Received the error in the title.

Then I continued reading. Followed htpc_guys instructions. Still no go-same error.

I ran XBMC from the terminal to maybe get a better idea what the problem is. I'm getting no information in the terminal about the problem.

Does anyone have a suggestion? Any help would be greatly appreciated.


- myth512 - 2010-11-13

I recently installed this script and loved it for the first minute. Using the Wii remote I pressed the home button and the script froze up. I restarted my media center (running xbmc-live 10.04 Damara beta 4 from xbmc-freak, updated beta 3 to 4 since fresh install) and when I go into addons the script is not there and I cannot get to it. I deleted the folder in the addons of .xbmc and fresh installed the script. It did not come back.

Does anyone know what I can do to get it back?


- htpc guy - 2010-11-13

myth512 Wrote:I recently installed this script and loved it for the first minute. Using the Wii remote I pressed the home button and the script froze up. I restarted my media center (running xbmc-live 10.04 Damara beta 4 from xbmc-freak, updated beta 3 to 4 since fresh install) and when I go into addons the script is not there and I cannot get to it. I deleted the folder in the addons of .xbmc and fresh installed the script. It did not come back.

Does anyone know what I can do to get it back?

If you have the Pandora script inside the addons folder everything should be fine. If its in the right spot and still not showing up then you may have a damaged script (i.e. a corrupt or missing file that breaks the plugin).

I suggest that you re-download the script and start over.


- myth512 - 2010-11-13

I tried re-downloading the script from the above link and starting over, but no luck. I left it zipped and went to get addon from zip file... in the addons section as opposed unzipping and moving to the addons folder in .xbmc. Thanks for the helpSmile

I'm at a bit of a stand still at the moment on the account that my daughter is insisting on watching a movie.