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)



Add Pandora Script as Favourite? - matt-tastic - 2011-08-17

I got the script working (i just added from zip file, then changed the pandora.py to have PROTOCOL_VERSION=31)

The only thing I can't figure out how to do it add it as a favourite. I use the NEON skin, and it allows you to make customer homescreen menus for favourites. I want to load the plugin from the homescreen, without having to go to the addons menu, then pandora. I know it sounds lazy, but i want to seem very organic.

is this possible?


- spbogie - 2011-08-18

What version are people downloading that they have to change the PROTOCOL_VERSIONHuh V1.2.3 in the main post already has PROTOCOL_VERSION=31.


tried everything - drcbass - 2011-08-18

I have tried everything and I can't get it to work.... It keeps saying script failed.. I downloaded the keys and did the Protocol_31 thing, but noting has worked.. Its been 3 days, I'm disgusted :mad::mad::confused2:No


- spbogie - 2011-08-18

@All,
If you want any sort of meaningful help I need log files (use a pastebin please). "It doesn't work" doesn't tell me anything useful.


Exiting script on XBMC nightlies - chrisjs - 2011-08-20

spbogie,

Very nice plugin! I just started using XBMC two days ago and this is my most used plugin so far.

However on the latest nightly builds, the script as-is can't be exited due to the keymaps being cleaned up to use a new Back action instead of PreviousMenu. (http://forum.xbmc.org/showthread.php?tid=105590)

I've made these changes locally to pandagui.py and now I can exit the script on the XBMC nightlies:
Code:
@@ -8,2 +8,3 @@
ACTION_NEXT_ITEM = 14
+ACTION_NAV_BACK = 92

@@ -46,3 +47,3 @@
        actionID   =  action.getId()
-        if (actionID == ACTION_PREVIOUS_MENU ):
+        if (actionID in [ACTION_PREVIOUS_MENU,ACTION_NAV_BACK]):
            if xbmc.getCondVisibility( 'Skin.HasSetting(PandoraVis)' ):



- spbogie - 2011-08-22

Thanks chrisjs, nice catch.
V1.2.4 up with fix for nightlies and a few other minor changes that didn't warrant their own release.


- dallasnights - 2011-08-22

WOW this is a great day, new Pandora and new Grooveshark that work great on ATV
If only someone can develop a spotify for ATV my life would be completeSmile

Thank you


- TechLife - 2011-08-22

Awesome. Thanks!


- toymachine2009 - 2011-08-23

Quick question. Or actually 2 questions.

I use xbmc commander to control xbmc. First question I cannot figure out for the life of me how to exit pandora I have to close xbmc and open it again to get back to main menu.

2nd question when I click the down arrow pandora screen goes away and you see the visualizations going but I cannot figure out how to get the pandora menu back.

Also are you able to add artists in this addon or can only be done on computer or iPad or whatever..


Edit: installed pandora on one htpc it worked went to my other I keep getting error unable to fetch keys. I triple checked login info not sure what else to do?


- htpc guy - 2011-08-25

So I finally decided to try a nightly build on my test machine. I installed todays build and its running on my win7 x64 machine. I just saw that this was compatible for nightly builds so I thought I would give it a try.

The first time I open the addon I get the settings screen, I enter my username/password, press ok and I can enjoy Pandora's yummy goodness. If I leave the addon and try to return I get a script failed message.

If I delete the Pandora addon from the userdata folder and start over I get the settings screen at launch, enter my credentials and it works again. But sadly It only works the first time.

Same thing happens in Confluence and Aeon MQ3.

I know what your going to say...no log file, no love. I ran debug logging replicated the error and now I just need to find the damn thing. Its been a while since I needed to get a debug log but doesn't seem to be where it used to be....oh and has anyone seen my keys?

Anyway, just thought I would post about the error. I'll google for the log location.


- garbear - 2011-08-25

Here's the error I get on my system (python 2.6, GIT head). The line print "PANDORA: Unexpected error:%s:%s" %sys.exc_info()[0:1] throws the error "TypeError: not enough arguments for format string". Apparently the error occurs in the error-handling code. Oh, the irony.

Code:
CApplication::ProcessMouse: trying mouse action leftclick
initializing python engine.
new python thread created. id=1
Thread XBPyThread start, auto delete: 0
Python thread: start processing
HttpApi Start command: broadcastlevel  paras: broadcastlevel; OnAction:100;2
UDPCLIENT TX: 39892        -> '<b>OnAction:100;2</b>'
-->Python Interpreter Initialized<--
XBPyThread::Process - The source file to load is C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora\default.py
XBPyThread::Process - Setting the Python path to C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora;C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.module.simplejson\lib;C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.module.beautifulsoup\lib;C:\Users\Garrett\Documents\XBMC\addons\script.module.pil\lib;C:\Users\Garrett\Documents\XBMC\addons\script.module.pysqlite\lib;C:\Users\Garrett\Documents\XBMC\system\python\DLLs;C:\Users\Garrett\Documents\XBMC\system\python\Lib;C:\Users\Garrett\Documents\XBMC\project\VS2010Express\XBMC\Debug (DirectX)\python26.zip;C:\Users\Garrett\Documents\XBMC\system\python\lib\plat-win;C:\Users\Garrett\Documents\XBMC\system\python\lib\lib-tk;C:\Users\Garrett\Documents\XBMC\project\VS2010Express\XBMC\Debug (DirectX);C:\Users\Garrett\Documents\XBMC\system\python;C:\Users\Garrett\Documents\XBMC\system\python\lib\site-packages;
XBPyThread::Process - Entering source directory C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora
Instantiating addon using automatically obtained id of "script.xbmc.pandora" dependent on version 1.0 of the xbmc.python api
PANDORA: Initializing v1.2.4
PANDORA: sys.platform = win32
Loading skin file: DialogProgress.xml
Load DialogProgress.xml: 22.86ms
DialogProgress::StartModal called
------ Window Init (DialogProgress.xml) ------
Alloc resources: 11.41ms (0.02 ms skin load)
'XBMC.exe': Loaded 'C:\Users\Garrett\Documents\XBMC\system\python\DLLs\pyexpat.pyd', Cannot find or open the PDB file
'XBMC.exe': Loaded 'C:\Users\Garrett\Documents\XBMC\system\python\DLLs\_hashlib.pyd', Cannot find or open the PDB file
'XBMC.exe': Loaded 'C:\Users\Garrett\Documents\XBMC\system\python\DLLs\_socket.pyd', Cannot find or open the PDB file
'XBMC.exe': Loaded 'C:\Users\Garrett\Documents\XBMC\system\python\DLLs\_ssl.pyd', Cannot find or open the PDB file
XCURL::DllLibCurlGlobal::CheckIdle - Closing session to http://feeds.feedburner.com (easy=09FFBF90, multi=0A004810)
PANDORA: Loading key from file "C:\Users\Garrett\AppData\Roaming\XBMC\userdata\addon_data\script.xbmc.pandora\key_in"
-->Python script returned the following error<--
Error Type: <type 'exceptions.TypeError'>
Error Contents: not enough arguments for format string
Traceback (most recent call last):
  File "C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora\default.py", line 235, in <module>
    panda = Panda()
  File "C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora\default.py", line 60, in __init__
    self.pandora = Pandora( dataDir, fmt )
  File "C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora\libpandora\pandora.py", line 33, in __init__
    if not self.keys.loadKeys():
  File "C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora\libpandora\keys.py", line 35, in loadKeys
    "key_in" ) )
  File "C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora\libpandora\keys.py", line 107, in _loadKeyFromFile
    print "PANDORA: Unexpected error:%s:%s" %sys.exc_info()[0:1]
TypeError: not enough arguments for format string
-->End of Python script error report<--
------ Window Init (DialogKaiToast.xml) ------
Alloc resources: 0.02ms (0.02 ms skin load)
Python script stopped
Thread XBPyThread 4256 terminating
The thread 'XBPyThread' (0x10a0) has exited with code 123 (0x7b).
waiting for python thread 1 to stop
python thread 1 destructed



- spbogie - 2011-08-25

garbear,
Doh, stupid mistake. Change [0:1] on that line to [0:2]. Fixed in git, but if it's getting there then it was going to error anyways so not really worth pushing everyone to a new version over. Should be a simple correction to make on your end, and come back with a more useful log.

htpc_guy,
Should be %APPDATA%\XBMC\ unless they moved it in the nightlies.


- toymachine2009 - 2011-08-25

toymachine2009 Wrote:Quick question. Or actually 2 questions.

I use xbmc commander to control xbmc. First question I cannot figure out for the life of me how to exit pandora I have to close xbmc and open it again to get back to main menu.

2nd question when I click the down arrow pandora screen goes away and you see the visualizations going but I cannot figure out how to get the pandora menu back.

Also are you able to add artists in this addon or can only be done on computer or iPad or whatever..


Edit: installed pandora on one htpc it worked went to my other I keep getting error unable to fetch keys. I triple checked login info not sure what else to do?

Bump.. Still have not figured out how to close Pandora without restarting xbmc..


- TechLife - 2011-08-25

toymachine2009 Wrote:Still have not figured out how to close Pandora without restarting xbmc..

If you check the keymap.xml, you will find there are two commands that will typically take you back - there is the esc key which is Home Menu and the Bksp which is Parent Directory. Bksp I have found will typically take you back to the previous screen and is what my back button on my remote is mapped to. I have found, for whatever reason, this will NOT take you back out of Pandora. I actually have to use esc. I haven't gotten around to remapping a button for it. If I had to guess, this is the issue you are facing. I don't have any experience with commander so I can't tell you exactly how to fix it but hopefully this will lead you down the right path...


- toymachine2009 - 2011-08-25

TechLife Wrote:If you check the keymap.xml, you will find there are two commands that will typically take you back - there is the esc key which is Home Menu and the Bksp which is Parent Directory. Bksp I have found will typically take you back to the previous screen and is what my back button on my remote is mapped to. I have found, for whatever reason, this will NOT take you back out of Pandora. I actually have to use esc. I haven't gotten around to remapping a button for it. If I had to guess, this is the issue you are facing. I don't have any experience with commander so I can't tell you exactly how to fix it but hopefully this will lead you down the right path...

Thank you it has given me somewhat of an idea to get started I will work on that tonight then. Thanks Atleast someone replied haha for days its been really annoying having to restart xbmc.

There has to be someone out there using xbmc commander on ipad or iphone who uses pandora.. Ill work on what you said in the mean time.