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)



- stigroar - 2010-11-18

momoski Wrote:I myself used https://github.com/akezeke/spotyxbmc to get it to work. Although I still have some issues, I find it do-able. Just a quick explanation of what u need to do, so that you understand the context.

Normally in XBMC there are all kinds of add-ons and scripts that can be dowloaded and installed with a single touch of a button. Unfortunately Spotify has a different kind of licence agreement and needs a key, that makes it harder to develop as an addon. Plus off course there must be people willing to develop such and addon. Akezeke for instance is willing, but rather waits until the new addon framework for xbmc is released that makes it possible to write add-ons in C++, rather than Python (Python is the current development language for addons).

So far the background. The steps mentioned on the website, basically contain the following:
- Download libspotify and install it. Libspotify is the API released by Spotify.
- Download sources of XBMC (the LiveCD contains the binaries that are built on those sources).
- Apply the batch from Akezeke to the downloaded XBMC source files. The patch integrates Spotify into XBMC and applies also your personal key. A personal key can only be obtained if you are a premium subscriber to Spotify. No premium subscription is no Spotify in XBMC.
- Compile the whole thing and install. The install will overwrite your XBMC executable, but your XBMC settings will remain untouched.

That's it.

Thanks for your quick and helpful response. Really appreciate it. I see that you use the exact same setup as me (AsRock with XBMCFreak live CD), so I should get it working!

A couple of questions:

I have understood that I should go for libspotify 0.0.3. The libspotify download link doesn't work (neither from spotify's website) http://developer.spotify.com/download/libspotify/libspotify-0.0.3-linux6-x86_64.tar.gz - Can it be downloaded elsewhere? EDIT: The download link works fine now!

My Ubuntu skills kinda stops here (at point zero...). How do I apply a batch? And how do I compile the whole thing? What does it mean? Where should I download the files to, and from where do I run the commands which is described in akezeke's guide?

I'm not THAT retard when it comes to PC's in general, but I have never touched a Linux installation. Sorry Smile


- stigroar - 2010-11-18

I figured out how to type commands in XBMC (Ctrl+Alt+F2). So now I'm following akezeke's guide, but am stuck on step 5. When typing
Code:
svn co http://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk
I get the error
Code:
-bash: svn: command not found

Any ideas?!


- akezeke - 2010-11-18

@stigroar

sudo apt-get install subversion


- stigroar - 2010-11-18

akezeke Wrote:@stigroar

sudo apt-get install subversion

Thanks for quick reply! When typing this i get the following error:

Quote:Package subversion is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source
E: Package subversion has no installation candidate

svn co http://........... still doesn't work.

EDIT: I ran "sudo apt-get update" before sudo apt-get install subversion" and the error is gone. However, i got a new one:

Quote:svn: Can't make directory 'trunk': Permission denied



- Puffytroll - 2010-11-18

You doesn't have the rights to download the sources to the directory you are in.
Give yourself rights or download to another dir Wink


- stigroar - 2010-11-18

Puffytroll Wrote:You doesn't have the rights to download the sources to the directory you are in.
Give yourself rights or download to another dir Wink

How do I download to another directory, and how do I create the directory to download to? Do I need to re-download the libspotify to the same directory?

Maybe easier to grant myself the rights. How do I do this?


- Puffytroll - 2010-11-18

chmod 755 "dir"

If you have installed Libspotify, it is in /usr/local I think, so you dont have to download it again Tongue

Anyway, you dont need to have the XBMC source and libspotify in the same dir


- stigroar - 2010-11-18

Puffytroll Wrote:chmod 755 "dir"

If you have installed Libspotify, it is in /usr/local I think, so you dont have to download it again Tongue

Anyway, you dont need to have the XBMC source and libspotify in the same dir

Which "dir" do I wish to chmod? I havn't navigated into any folders, so where am I then?!

Btw my remote control has stopped working. Believe it happened when I installed subversion...


- Puffytroll - 2010-11-18

http://forum.xbmc.org/showthread.php?tid=84504
|
|
Remote fix Wink



Edit:

I get this error:

/usr/bin/ld: cannot find -lspotify


any ideas ?

EDIT: Found out. I had installed libspotify into usr/loca instead of local x)


- stigroar - 2010-11-19

Got my remoe working. Thanks, Puffytroll!

Still can't figure out my main issue though...


- Puffytroll - 2010-11-19

Do like I did:

cd to your home folder (just type cd)
mkdir temp
chmod 777 temp
cd temp
svn co .......
then you follow the guide from there Wink


- stigroar - 2010-11-19

Seems to work! At least it's downloading a bunch of files right now. Thanks again! Smile


- stigroar - 2010-11-19

It now fails on step 7:
Quote:7. Spotify API key
Get your own spotify API key from http://developer.spotify.com/en/libspotify/application-key/
Add it to the beginning of ./xbmc/xbmc/spotinterface.cpp.

$ gedit ./xbmc/spotinterface.cpp

I installed gedit by typing
Code:
sudo apt-get install gedit

When typing "gedit ./xbmc/spotinterface.cpp" I get the following error:

Quote:(gedit:4208): Gtk-WARNING **: cannot open display:



- stigroar - 2010-11-19

I by the way use SSH through Putty, if that should matter...


- Puffytroll - 2010-11-19

You need to use nano instead of gedit.... Gedit needs a GUI to run.

nano ./xbmc/spotinterface.cpp