Pandora Add-on LE 7.9 Error

  • Happy New Year all, what better way to spend the holiday than working on kodi. I just upgraded to 7.9 from 7.1 on an Odroid C2, and that has kept me nice and busy trying to get it back to the way I had it. The Pandora add-on from spbogie was working well in 7.1, but I'm getting an error which looks like it is a python player issue, the Pandora script uses xbmc.PLAYER_CORE_MPLAYER. I'm still trying to learn how everything is related, so that's my rookie guess so far. I'm figuring the python script needs to be updated or I need to update a library somewhere which may had gotten lost in the upgrade. Putty shows I'm running Python 2.7.13. Here is the error message from kodi.log:

    Code
    Error Type: <type 'exceptions.AttributeError'>
    Error Contents: 'module' object has no attribute 'PLAYER_CORE_MPLAYER'
    Traceback (most recent call last):
    File "/storage/.kodi/addons/script.xbmc.pandora/default.py", line 246, in <module>
        panda = Panda()
    File "/storage/.kodi/addons/script.xbmc.pandora/default.py", line 97, in __init__
        self.player = PandaPlayer( panda = self )
    File "/storage/.kodi/addons/script.xbmc.pandora/pandaplayer.py", line 7, in __init__
        xbmc.Player.__init__( self, xbmc.PLAYER_CORE_MPLAYER )
    AttributeError: 'module' object has no attribute 'PLAYER_CORE_MPLAYER'

    Here is the python code from pandaplayer.py

    Thanks
    [hr]
    Well, nevermind, I think I have a working Pandora addon again. I initially got it working again by using rivy's util.py and pandaplayer.py in place of spbogie's, but then decided to wipe out spbogie's and go with rivy's entirely. I haven't really wrapped my head around all the different addons out there.

    The one line that needs to be updated in rivy's is in the pandaplayer.py which I found fritsch posted the change for rivy. So in case this helps anyone else that wanted the Pandora add-on for LE, download the zip from rivy here:
    GitHub - rivy/xbmc-pandora: Pandora Radio plugin for XBMC

    Install the add-on from zip. Browse to the python file kodi/addons/script.audo.pandora/resources/lib/pandaplayer.py and update the line under the procedure "def play" from
    xbmc.Player( xbmc.PLAYER_CORE_MPLAYER ).play( url, item )
    to
    xbmc.Player().play( url, item )

    Here's fritsch's post
    API change in upcoming kodi v17 · Issue #23 · rivy/xbmc-script.audio.pandora · GitHub

    Thanks to all the developers with the work on the Pandora addon. Took some hunting and a small update, but looks like it is still working for kodi after all these years.

    Edited once, last by StitchedChin (January 2, 2017 at 12:34 AM).