Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Make spotimc compatible to XBMC 12 (Frodo) #66

Closed
christian667 opened this Issue · 8 comments

2 participants

@christian667

I tried to install the addon on xbmc 12, first the requirements didn't allow the installation, then I installed
http://ftp.heanet.ie/mirrors/xbmc/addons/eden/script.module.elementtree/
and the installation succeeded.
After the first installation routine of spotimc and a restart of xbmc the start of the plugin crashed, xbmc.log:

01:40:14 T:140448455624640 ERROR: ClearBlock: Trying to clear non existent block /home/christian/.xbmc/addons/script.audio.spotimc
01:40:14 T:140448455624640 INFO: Loading skin file: /home/christian/.xbmc/addons/script.audio.spotimc/resources/skins/DefaultSkin/720p/loading-window.xml, load type: LOAD_ON_GUI_INIT
01:40:14 T:140448455624640 ERROR: LoadXML: Unable to load skin file /home/christian/.xbmc/addons/skin.confluence/720p/home/christian/.xbmc/addons/script.audio.spotimc/resources/skins/DefaultSkin/720p/loading-window.xml
01:40:14 T:140448455624640 DEBUG: Load /home/christian/.xbmc/addons/script.audio.spotimc/resources/skins/DefaultSkin/720p/loading-window.xml: 1.70ms
...
01:40:20 T:140448163469056 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type:
Error Contents: argument "defaultRes" for method "XBMCAddon::xbmcgui::WindowXMLDialog" must be unicode or str
Traceback (most recent call last):
File "/home/christian/.xbmc/addons/script.audio.spotimc/default.py", line 76, in
main(addon_path)
File "/home/christian/.xbmc/addons/script.audio.spotimc/resources/libs/spotimcgui/init.py", line 269, in main
if do_login(sess, addon_dir, "DefaultSkin"):
File "/home/christian/.xbmc/addons/script.audio.spotimc/resources/libs/spotimcgui/init.py", line 215, in do_login
"login-window.xml", script_path, skin_dir, session
TypeError: argument "defaultRes" for method "XBMCAddon::xbmcgui::WindowXMLDialog" must be unicode or str
-->End of Python script error report<--
01:40:20 T:140447025669888 DEBUG: Thread Background Loader 140447025669888 terminating

sorry for the bad format of the log...
Please adjust this, I really love this plugin and used it everyday, but the update made it incompatible.

@christian667

Ok now I just pulled the freshest git and copied the new files to my addon installation.
The login process works, clicking the "Remember me" button kills the xbmc.
After the login the playlists of "whats new" appear and selecting them also works.
Switching over to my playlists kills xbmc, but starting a song within a playlist of the startup page
makes the xbmc to hang up for quite a while and claiming that the playback didn't work.
So right now I think it's not the time for frodo yet, the plugin isn't as ready as needed.. I decided to switch back
to eden.

@christian667

Ok I would really like to use XBMC 12 Frodo, but without spotimc - no way ;-)
I just found the reason (maybe) which makes spotimc incompatible with the xbmc dev:
http://4youtech22.appspot.com/forum.xbmc.org/showthread.php?tid=125147&page=35
Would appreciate if someone could patch/fix this to run with Frodo :)

@mazkolain
Owner

I'm aware of the following issues on Frodo:

Anyway, keep in mind that Spotimc won't work well yet with Frodo, as there's still lots of fresh code entering it's master branch that may potentially affect backwards compatibility.

In conclusion, I'm afraid that Spotimc won't be reliable on Frodo until beta/rc releases. Sorry.

@christian667

I understand that you'll have to respect the backwards compatibility, even that nobody knows when Frodo will be officially released.. But raspbmc and openelec on the raspberry pi merged both (as I know) to Frodo and it would be great to use them (also with the pvr build in :-) ). My python skills are not the best and I have no experience in developing addons with xbmc, but maybe someone could branch spotimc and fix the frodo errors with as less code as needed, that the changes remerge to master when the time has come.. :)

@mazkolain
Owner

If I'm not wrong the changes needed for Spotimc to add support for Frodo should be minimal (or no changes at all).

What is really happening (as long as my assumptions are correct) is that some recent commits on XBMC's master branch introduced a regression that caused some features that were supposed to work on Spotimc's side to stop doing so.

Regarding raspberry pi support, keep in mind that libspotify is not currently compatible with most rpi distros around: #48 (comment)

@christian667

Ok agreed the soft-float problem is hopefully fixed soon by spotify.. who knows.
Other solution could be to install Soft-float Debian “wheezy”:
http://www.raspberrypi.org/downloads
And compile the xbmc step by step:
http://www.raspbian.org/RaspbianXBMC
but I'm not sure if this howto works, because the raspberry pi code merged into xbmc master about a month ago:
xbmc/xbmc#1282
(latest post on http://xbmc.org/)

@christian667

I tested the freshest code with the current updated xbmc frodo, just
copied the git clone over the addon folder, (had to remove the dlls lib folders holding the wrong elf libspotify files)
and surprisingly I had the first success :)
Login now works, the "whats new" page is displayed correctly, switching to "my playlists" or even exit doesn't work, it is not responding when clicking the tabs.
Opening some playlists on the whats new page works as well as playing the songs :)
I just couldn't select the second song in a playlist, but playing the first one and the next one by one works well.
A view into the log showed me the (maybe) happening issue:

#################################################
...
02:54:05 T:140613165979392 ERROR: Traceback (most recent call last):
File "/home/christian/.xbmc/addons/script.audio.spotimc/resources/libs/CherryPy.egg/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate
req.respond()
File "/home/christian/.xbmc/addons/script.audio.spotimc/resources/libs/CherryPy.egg/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "/home/christian/.xbmc/addons/script.audio.spotimc/resources/libs/CherryPy.egg/cherrypy/wsgiserver/wsgiserver2.py", line 2117, in respond
for chunk in response:
File "/home/christian/.xbmc/addons/script.audio.spotimc/resources/libs/CherryPy.egg/cherrypy/cpwsgi.py", line 161, in next
return self.trap(self.iter_response.next)
File "/home/christian/.xbmc/addons/script.audio.spotimc/resources/libs/CherryPy.egg/cherrypy/cpwsgi.py", line 193, in trap
self.start_response(s, h, _sys.exc_info())
File "/home/christian/.xbmc/addons/script.audio.spotimc/resources/libs/CherryPy.egg/cherrypy/_cpwsgi.py", line 169, in trap
return func(args, *kwargs)
File "/home/christian/.xbmc/addons/script.audio.spotimc/resources/libs/CherryPy.egg/cherrypy/_cpwsgi.py", line 261, in next
return self.iter_response.next()
File "/home/christian/.xbmc/addons/script.audio.spotimc/resources/libs/PyspotifyCtypesProxy.egg/spotifyproxy/httpproxy.py", line 302, in _write_file_content
self.__cb_stream_ended()
File "/home/christian/.xbmc/addons/script.audio.spotimc/resources/libs/PyspotifyCtypesProxy.egg/spotifyproxy/utils.py", line 31, in __call

self.callback(args, *kwargs)
File "/home/christian/.xbmc/addons/script.audio.spotimc/resources/libs/spotimcgui/__init
.py", line 274, in preloader
buffer.open(sess_ref, playlist_manager.get_next_item())
File "/home/christian/.xbmc/addons/script.audio.spotimc/resources/libs/spotimcgui/playback.py", line 295, in get_next_item
if next_index < len(playlist):
TypeError: object of type 'xbmc.PlayList' has no len()
...
#################################################
Sorry for the bad format..
But I am really happy to see the first songs playing on xbmc 12 :)

@christian667

Ok I don't know how you fixed it, I tried to keep an eye on your commits but now, it simply works! GREAT WORK!!! Just installed the beta3 on a fresh xbmc 12 Frodo and everything works.. so happy!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.