Kodi Community Forum
[WIP] XBMC + Spotify = True (an XBMC implementation that uses Spotify's official API) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Kodi related discussions (https://forum.kodi.tv/forumdisplay.php?fid=6)
+--- Thread: [WIP] XBMC + Spotify = True (an XBMC implementation that uses Spotify's official API) (/showthread.php?tid=67012)



- opdenkamp - 2010-11-23

hmm I wonder what went wrong there... trying to compile a partially patched source from a branch that doesn't even exist ("pvr-testing2 branch" and "Dharma svn" at the same time?)


pvr-testing2 - moksha - 2010-11-23

Oh?
http://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/pvr-testing2

Thank you for the reply.


- topfs2 - 2010-11-23

If you patching you really should have C++ knowledge and considering what you posted back you probably have none (since you haven't given any information needed to solve it).


- arfoll - 2010-11-24

Puffytroll Wrote:The download link is broken Tongue

woops. fixed.

I was sure I was subscribed to this thread sorry about the slowness.


- LeGrandHorg - 2010-12-10

Has anyone had success with the precompiled binaries for 32bit Linux? I used spotyxbmc_alpha014_ubuntu32.tar.gz and the associated (and extremely simplistic) install.sh script on 32bit Ubuntu 10.04 and XBMC would just crash on startup.

The wiki revealed nothing on the subject of Spotify, sadly.

Edit: I should add that I am currently using XBMC version 2:10.00~svn35567-lucid1 from the PPA repo.


- arfoll - 2010-12-10

LeGrandHorg Wrote:Has anyone had success with the precompiled binaries for 32bit Linux? I used spotyxbmc_alpha014_ubuntu32.tar.gz and the associated (and extremely simplistic) install.sh script on 32bit Ubuntu 10.04 and XBMC would just crash on startup.

The wiki revealed nothing on the subject of Spotify, sadly.

Edit: I should add that I am currently using XBMC version 2:10.00~svn35567-lucid1 from the PPA repo.

I would really recommend you compile from sources with the included patch (you may have to do something to make it work with RC2 but probably not much), the version up their is 10 months old and probably not compatible with ubuntu 10.04.


- LeGrandHorg - 2010-12-11

arfoll Wrote:I would really recommend you compile from sources with the included patch (you may have to do something to make it work with RC2 but probably not much), the version up their is 10 months old and probably not compatible with ubuntu 10.04.

I tried it but failed. I cannot compile spotinterface.o because make complains about "spotinterface.h:71: error: ISO C++ forbids declaration of ‘sp_session’ with no type", and then goes on to list a lot of undeclared sp_* variables.

This was using current svn trunk of XBMC and libopenspotify 0.0.6.


- LeGrandHorg - 2010-12-11

Hmm, well I got that sorted - the suggested sed command rendered api.h into a 0 byte file. I sorted it and tried again, found an issue where I had to replace the reference to the api.h file from spotify/api.h to libspotify/api.h, but then I only got bucketload of other errors.

I am reverting to libspotify 0.0.4 and see if that makes any difference.


- arfoll - 2010-12-11

LeGrandHorg Wrote:Hmm, well I got that sorted - the suggested sed command rendered api.h into a 0 byte file. I sorted it and tried again, found an issue where I had to replace the reference to the api.h file from spotify/api.h to libspotify/api.h, but then I only got bucketload of other errors.

I am reverting to libspotify 0.0.4 and see if that makes any difference.

Don't see how it would be a revert since libopenspotify is deprecated...

If you read here you will see I state libspotify 0.0.3 is a "prerequisite". 0.0.4 will need you to change abit of code and read up on the API.

Enjoy!


- LeGrandHorg - 2010-12-11

arfoll Wrote:Don't see how it would be a revert since libopenspotify is deprecated...

If you read here you will see I state libspotify 0.0.3 is a "prerequisite". 0.0.4 will need you to change abit of code and read up on the API.

Enjoy!

Thank you very much. 0.0.4 compiled over the night, but I'll revert to 0.0.3 and give it another whirl. Your link was one page on the topic of Spotify and XBMC that I haven't read. Perhaps we should start a page on the wiki here outlining the current "best practice" for integrating Spotify with XBMC? There seems to be a whole lot of information but it is scattered and gathering it all seems to take a couple of nights at least. Nod


- arfoll - 2010-12-11

LeGrandHorg Wrote:"best practice" for integrating Spotify with XBMC? There seems to be a whole lot of information but it is scattered and gathering it all seems to take a couple of nights at least. Nod

It's easy you go on my blog (follow the instructions Nod) and fix the patch for whatever version of dharma you are using and off you go...

The real solution would be to either get this patch included or have someone maintain it properly but I dont think they want this in trunk and I don't have the time to fix the patch and make builds for every OS. A loan patch like this one will always be for the not faint of heart!

Glad you got it working ;-)


- zteifel - 2010-12-11

Has anyone got a solution to control spotify in xbmc from the web interface?


- LeGrandHorg - 2010-12-11

arfoll Wrote:It's easy you go on my blog (follow the instructions Nod) and fix the patch for whatever version of dharma you are using and off you go...

The real solution would be to either get this patch included or have someone maintain it properly but I dont think they want this in trunk and I don't have the time to fix the patch and make builds for every OS. A loan patch like this one will always be for the not faint of heart!

Glad you got it working ;-)

Well, it built. However, XBMC just bails on start with no error messages even after setting the log level to 1. The log lists the remotes supported...and then XBMC dies a quick clean death and restarts (rinse and repeat ad nauseum).

I guess I have myself to blame, going with your patch and SVN trunk. Big Grin
Now, let's see what happens if I actually really really follow your instructions and use RC1. But what's the fun in that? Big Grin


- arfoll - 2010-12-12

LeGrandHorg Wrote:Well, it built. However, XBMC just bails on start with no error messages even after setting the log level to 1. The log lists the remotes supported...and then XBMC dies a quick clean death and restarts (rinse and repeat ad nauseum).

I guess I have myself to blame, going with your patch and SVN trunk. Big Grin
Now, let's see what happens if I actually really really follow your instructions and use RC1. But what's the fun in that? Big Grin

if you use libspotify 0.0.3 it should work with trunk (at least it did 2 weeks ago).

Good luck ;-)


- LeGrandHorg - 2010-12-13

I got it working well enough using RC1 and libspotify 0.0.3, thank you very much!

However, as my wife started it today XBMC just failed on start. When I got back home and had a look at it I was quite surprised when I found this in the xbmc user's ~/.xsession-errors:
Code:
/usr/local/lib/xbmc/xbmc.bin: error while loading shared libraries: libspotify.so: cannot open shared object file: No such file or directory

Puzzled, I checked /usr/local/lib and the files where there alright. Uninstalled libspotify, reinstalled it. No go. Scratching my head, I ran ldd on xbmc.bin and found this:
Code:
[hakan@xbmc:~]% ldd /usr/local/lib/xbmc/xbmc.bin | grep spot                                                              [21:56]
    libspotify.so => not found
This ain't right! I ran ldconfig -v and got this:
Code:
/usr/local/lib:
         -> libspotify.so.3.0.61232
This is seriously bad. I have never seen anything like this. It should say something along the lines of libspotify.so -> libspotify.so.3.0.61232.

Googling the issue I found a post on the Spotify Community Support outlining how broken libspotify 0.0.3 really is, missing SONAME header and everything.

Anyhow, I installed 0.0.4 which actually sort of fixed the problem - XBMC can now start and function, but the Spotify functions don't do anything. Reverted back to 0.0.3 to verify, and yes, it is still broken.

I feel the urge to use inappropriate language here to vent some frustration but I realize none of the XBMC developers (or users!) are to blame. libspotify 0.0.3 is just plain broken.

After even more investigation, I found that the problem (missing header information in libspotify) is triggered when I run ldconfig. ldconfig uses SONAME to retrieve names for the symlinks it creates, and libspotify is missing this, so the ld.so.cache will simply not list libspotify.so.

I finally tricked XBMC back to working with 0.0.3 by installing 0.0.4, then running ldconfig, uninstalling 0.0.4 and finally installing 0.0.3 again - and this time I did NOT run ldconfig.

So far so good, but ldconfig can be triggered by Ubuntu security updates, and I don't look forward to having explain to my wife over the phone how to make it work again. :-P

So... How's the progress on 0.0.6 and XBMC? Big Grin