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)



- Flanhare - 2011-09-06

alex84 Wrote:Thanks for helping.
Im well aware how to ssh to the box. The problem is when running " make install xbmc" command it wont go throw the command. I have tried countless times but cant get past even The bootstrap command. I think that this coul be an issue of the livexbmc not having all the full blown features. I was hoping someone with more knowledge could try the install on a liveinstall of xbmc. I have almost given up since running an full ubuntu / linux install is not anoption for my ion pc. If anyone can confirm your script or other install way that works on the xbmclive version i happily test it.
Well, I can't say for sure what's going wrong. But it is working for me running XBMC Live on a ION PC. So it is for sure possible.

Please post your full log from the terminal. There is no idea to run make install if the previous step failed and so on.


- Tompen - 2011-09-06

Any idea why spotyxbmc2 does not work on windows xp?

Win xp sp3 32-bit, xbmc.exe does not start (access violation).
Win 7 sp1 32-bit, works really good. Fantastic.

Same xbmc commit built without spotify integration works ok on win xp 32-bit.
Have not tried 64-bit windows. The branch spotyxbmc1 also behave the same.


- coendeurloo - 2011-09-06

Flanhare Wrote:As the error message says, a library is missing. It is hard to tell which one, but open README.ubuntu file and check the requirements and manually do a apt.get install as stated in the file.

So there is a library missing in apt-get install line in the script.

EDIT: Yes, you should do everything as root.

Isn't your script meant to install all the required libraries..? I have no idea how to check which ones are installed and which not, I'm just running XBMCLive and access it through putty.

I can't imagine there aren't more people with an XBMCLive install who would like to install Spotify and know what to do? It's the most commonly used version right?


- coendeurloo - 2011-09-06

Flanhare Wrote:Well, I can't say for sure what's going wrong. But it is working for me running XBMC Live on a ION PC. So it is for sure possible.

Please post your full log from the terminal. There is no idea to run make install if the previous step failed and so on.

I have the same setup as you, could you please describe the steps you did to get this to work?


UberNoob Guide to Building XBMC with Spotify - Gr8rtek - 2011-09-06

This guide outlines the steps I've taken to properly install Spotify on Windows 7 64-bit. This guide comes with the caveat that I am not a software developer, have never written a line of C++ code and have a very limited understanding of object-oriented development. With all of that said, I do have this working for my system, and I hope this guide will work for someone else out there. Software developers may chime in and say that some steps can be removed or are redundant, and that is fine. Like I said, this is what worked for me. This guide is based on the Windows Install readme originally provided by Akezeke on his GitHub website, expanded for the less-technically inclined. Many thanks also to AbandonNow on the XBMC forums, as some of his findings helped me get this working on my system.

Set Up the Build Environment

Prerequisites
Git for Windows [http://code.google.com/p/msysgit/downloads/list ]
Visual C++ Express [http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express ]
DirectX SDK [http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=6812 ]
Nullsoft Scriptable Install System (NSIS) [http://sourceforge.net/projects/nsis/files/NSIS%202/2.46/ ]
Spotify Premium Account [http://www.spotify.com/us/get-spotify/premium/ ]

Install guide for Git for Windows can be found at http://help.github.com/win-set-up-git/
If you read through the XBMC build documentation it says NSIS is optional depending on how you intend to install XBMC. I chose to install it so I could create an installer to deploy XBMC with Spotify to multiple Windows machines.

Once the build environment is successfully set up, we can begin!

Acquire the Necessary Software
1. Launch Git for Windows (Git Bash shortcut on desktop)
2. Determine your current directory location by typing pwd
3. Navigate to the root directory by typing cd /c/
4. Create a Build/Dev directory by typing mkdir dev
5. Change to the new directory by typing cd dev
6. Download the SpotyXBMC source code by typing:
git clone git://github.com/akezeke/spotyxbmc2.git
7. While these files are downloading, go get your Spotify AppKey
[INDENT]1. Open a browser and go to *http://developer.spotify.com/en/libspotify/application-key/
2. Log in with your Spotify credentials
3. Click on the c-code link to be redirected to a different page
4. Highlight all of the text [CTRL-A] and copy [CTRL-C]
5. Open a text editor like Notepad or equivalent
6. Paste the contents from the clipboard [CTRL-V]
7. Save the file as appkey.h in the folder c:\dev\spotyxbmc2
8. In the Save As type drop-down menu, select “All Files”
9. Click Save
[/INDENT]
8. Once the files have downloaded from Step 6, you can exit out of Git for Windows by typing exit
9. Open Windows Explorer [WinKey-E] and navigate to c:\dev\spotyxbmc2\project\BuildDependencies
10. Double-click the file DownloadBuildDeps.bat
11. Wait for the script to finish and the command window to close
12. Double-click the file DownloadMingwBuildEnv.bat
13. Wait for the script to finish and the command window to close
14. Navigate to c:\dev\spotyxbmc2\project\Win32BuildSetup
15. Double-click the file named buildmingwlibs.bat
16. Wait for the script to finish
17. Now navigate to c:\dev\spotyxbmc2\project\VS2010Express
18. Right-click the file named XBMC for Windows.sln and select Open With >> Visual C++ Express
19. Wait a few minutes until the status in the lower left corner quits updating or reads “Ready”
20. Locate the three drop-down menus in the main toolbar
[INDENT]1. In the first (left) drop down menu, change Debug to Release (DirectX)
2. The second (middle) drop down menu should read Win32
[/INDENT]
21. Press F7 to begin the build process
22. Wait a few minutes for this step to complete
[INDENT]1. Monitor the text in the Output window across the bottom of the app
2. The final line should read something like “Build Successful”
[/INDENT]
23. Exit out of Visual C++ Express
24. Go back to Windows Explorer and you should see a new folder named XBMC in c:\dev\spotyxbmc2\project\VS2010Express
25. Navigate to c:\dev\spotyxbmc2\project\Win32BuildSetup\dependencies
26. Copy all of the .dll files from this location to c:\dev\spotyxbmc2\project\VS2010Express\XBMC\Debug (DirectX)
27. Navigate to c:\dev\spotyxbmc2\project\Win32BuildSetup
28. Double-click the file named BuildSetup.bat
[INDENT]1. This is where actual software developers may have a dissenting opinion, saying that it is not necessary to run this after going through the previous steps. Again, I am including this because these are the “exact” steps I followed to successfully get Spotify working with XBMC.
[/INDENT]
29. Wait for the script to finish
[INDENT]1. You will know it is complete when it asks if you want to view the Debug log file. Type Y or N (your choice!) and then press the elusive Any Key to exit
[/INDENT]
30. You should now have a custom installer named XBMCSetup_[release date]_[build#].exe in c:\dev\spotyxbmc2\project\Win32BuildSetup
31. You can double-click the executable and install XBMC
[INDENT]1. If XBMC is already installed, you can uninstall it but keep your userdata folder
[/INDENT]

Configuring XBMC with Spotify
1. Launch XBMC [Start > All Programs > XBMC > XBMC]
2. Navigate to System > Add-Ons > Enabled Add-Ons > Music Add-Ons
3. Select SpotyXBMC
4. Select Configure
5. Select the radio button next to Enable
6. Enter your Spotify username
7. Enter your Spotify password
[INDENT]1. IMPORTANT! Several users have reported issues if their Spotify password starts with an upper-case letter. I got this working after changing my password to one that begins with a lower-case letter.
[/INDENT]
8. Select OK
9. Press ESC a few times to return to the Home window
10. Exit XBMC
11. Launch XBMC [Start > All Programs > XBMC > XBMC]
12. Select Music
[INDENT]1. If XBMC was installed previously and you had music in your library, you should now see your Spotify playlists in the Playlist section, as well as being able to use the Search function to search for artists/songs/albums on Spotify
2. If you did not have XBMC installed prior to this, you will need to add some music to XBMC before you can enable the library
[/INDENT]
[INDENT][INDENT]1. From the Home window go to Music > Add Source
2. You can either point XBMC to your existing music library or simply copy a few MP3 files to your computer and then point XBMC to those files in this step
3. If you choose to do this, it may be helpful to ensure your files are structured as <Artist Name>/<Album Name>/<Track ## - Track Name>
4. Once you add a few tracks/many tracks, highlight an artist, press C on the keyboard and select Scan Item to Library
5. Wait a few minutes for this process to complete
6. Press the left arrow on the keyboard
7. Scroll down and ensure the radio button next to Library is selected/active
8. Press the right arrow to return to the Music section
9. Press ESC to return to the Home window
10. Select Music again and with any luck you should now see your Spotify playlists in the Playlist section, as well as being able to use the Search function to search for artists/songs/albums on Spotify
[/INDENT][/INDENT]

Of course, feedback is welcome! Hopefully this guide will prove useful to someone else out there. If it is helpful, perhaps a Moderator would consider moving it to the HOW-TO section of the forums.


- IAmNotAUser - 2011-09-06

coendeurloo Wrote:Isn't your script meant to install all the required libraries..? I have no idea how to check which ones are installed and which not, I'm just running XBMCLive and access it through putty.

I can't imagine there aren't more people with an XBMCLive install who would like to install Spotify and know what to do? It's the most commonly used version right?

As last error message before failing states:
Code:
checking for main in -lyajl... no
you need the libyajl-dev library
Code:
sudo apt-get install libyajl-dev

For the complete list of dependencies that need to be installed to build from source: http://forum.xbmc.org/showthread.php?tid=89817
Code:
apt-get update
apt-get install libplist-dev python-support python-dev ccache libyajl-dev libvdpau-dev debhelper zip git-core make g++ gcc gawk pmount libtool yasm nasm automake cmake gperf gettext unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound-dev python-sqlite libglew-dev libcurl3 libcurl4-openssl-dev x11proto-xinerama-dev libxinerama-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbisenc2 libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libfaac-dev libenca-dev libxt-dev libxtst-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate-dev libmms-dev libmpeg3-dev libfaad-dev libflac-dev libiso9660-dev libass-dev libssl-dev fp-compiler gdc libwavpack-dev libmpeg2-4-dev libmicrohttpd-dev libmodplug-dev libboost-thread-dev -y -q

I'd recommend sticking in those 2 lines just to make sure you have everything you need.


- alex84 - 2011-09-06

Flanhare Wrote:Well, I can't say for sure what's going wrong. But it is working for me running XBMC Live on a ION PC. So it is for sure possible.

Please post your full log from the terminal. There is no idea to run make install if the previous step failed and so on.

Thanks... I will give this a go this weekend. Need to do a full disk clone first then il get down trying again.


- coendeurloo - 2011-09-09

IAmNotAUser Wrote:As last error message before failing states:
Code:
checking for main in -lyajl... no
you need the libyajl-dev library
Code:
sudo apt-get install libyajl-dev

For the complete list of dependencies that need to be installed to build from source: http://forum.xbmc.org/showthread.php?tid=89817
Code:
apt-get update
apt-get install libplist-dev python-support python-dev ccache libyajl-dev libvdpau-dev debhelper zip git-core make g++ gcc gawk pmount libtool yasm nasm automake cmake gperf gettext unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound-dev python-sqlite libglew-dev libcurl3 libcurl4-openssl-dev x11proto-xinerama-dev libxinerama-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbisenc2 libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libfaac-dev libenca-dev libxt-dev libxtst-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate-dev libmms-dev libmpeg3-dev libfaad-dev libflac-dev libiso9660-dev libass-dev libssl-dev fp-compiler gdc libwavpack-dev libmpeg2-4-dev libmicrohttpd-dev libmodplug-dev libboost-thread-dev -y -q

I'd recommend sticking in those 2 lines just to make sure you have everything you need.

Thanks, however when I try the first one, I get this message:

Image

Pretty weird?


- Flanhare - 2011-09-09

coendeurloo Wrote:Thanks, however when I try the first one, I get this message:

Image

Pretty weird?

Have you ran "apt-get update" before? Otherwise google how to install.


- Xanadu20 - 2011-09-11

Hi guys,

I have a fresh XBMC-Live install, and got the addon installed, and built. However when ever i go into music library and select anything like artist etc XBMC crashes out and restarts.

I have had to cut down my xbmc crash log, i have just included the end...

http://pastie.org/2517702

could anyone give me a hand


Thanks in advance

Rich


- Xanadu20 - 2011-09-11

Xanadu20 Wrote:Hi guys,

I have a fresh XBMC-Live install, and got the addon installed, and built. However when ever i go into music library and select anything like artist etc XBMC crashes out and restarts.

I have had to cut down my xbmc crash log, i have just included the end...

http://pastie.org/2517702

could anyone give me a hand


Thanks in advance

Rich

Ignore the above, turns out i made a spelling mistake with my password.

Rich


- kooolkat357 - 2011-09-11

@Gr8rtek

Thanks allot for your nice Windows compiling/installation guide Smile

Helped me out allot, got spotifyXbmc 2 work @ first try!

Edit: Spotify works but every other file online & offline will not play! Any advice?


- alex84 - 2011-09-11

Finaly got it working Sweet...

The steeps taken to get this running on an xbmclive install.

1.
Quote:Get your own spotify API key from http://developer.spotify.com/en/libs...plication-key/ Click on c-code and copy the content to a new file called appkey.h
placed in your home folder (~/).

2.
Quote:Connect with an ssh client like putty and login to your xbmc machine. I use root for this

3.
Code:
cd /home/xbmc
Code:
wget -nc -q https://raw.github.com/Drol/XBMCStuff/master/sxgb.sh
Code:
chmod +x sxgb.sh
Code:
./sxgb.sh upgrade

The install will start and take around 5-15min or so, depending on pc speed. I got some warnings first of that the appkey.h was not found, and later on some missing librarys. This will get corrected soon.

When the building was done i did not have spotixbmc installed and i follow IAmNotAUser's post adding missing librarys.

Code:
apt-get install libyajl-dev
Code:
apt-get update
Code:
apt-get install libplist-dev python-support python-dev ccache libyajl-dev libvdpau-dev debhelper zip git-core make g++ gcc gawk pmount libtool yasm nasm

automake cmake gperf gettext unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev

libsqlite3-dev libogg-dev libasound-dev python-sqlite libglew-dev libcurl3 libcurl4-openssl-dev x11proto-xinerama-dev libxinerama-dev libxrandr-dev libxrender-

dev libmad0-dev libogg-dev libvorbisenc2 libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev

libfontconfig-dev libbz2-dev libboost-dev libfaac-dev libenca-dev libxt-dev libxtst-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev

libsamplerate-dev libmms-dev libmpeg3-dev libfaad-dev libflac-dev libiso9660-dev libass-dev libssl-dev fp-compiler gdc libwavpack-dev libmpeg2-4-dev

libmicrohttpd-dev libmodplug-dev libboost-thread-dev -y -q

And now this will take some time....
Code:
./sxgb.sh refresh

The installation was refreshed took around 30min after this i could start upp spotifxbmc Big Grin

Thanks to Flanhare's script and IAmNotAUser 's post.
I have written the steps in the order i done them and that worked for me. If you want to do the steps in another order it's up to you.

And also a big thanks to Akeeze, this is the best thing happening to xbmc since sliced bread Nod

Best regards.


- weiuweiu - 2011-09-11

alex84 Wrote:Finaly got it working Sweet...

The steeps taken to get this running on an xbmclive install.

1.


2.


3.
Code:
cd /home/xbmc
Code:
wget -nc -q https://raw.github.com/Drol/XBMCStuff/master/sxgb.sh
Code:
chmod +x sxgb.sh
Code:
./sxgb.sh upgrade

The install will start and take around 5-15min or so, depending on pc speed. I got some warnings first of that the appkey.h was not found, and later on some missing librarys. This will get corrected soon.

When the building was done i did not have spotixbmc installed and i follow IAmNotAUser's post adding missing librarys.

Code:
apt-get install libyajl-dev
Code:
apt-get update
Code:
apt-get install libplist-dev python-support python-dev ccache libyajl-dev libvdpau-dev debhelper zip git-core make g++ gcc gawk pmount libtool yasm nasm

automake cmake gperf gettext unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev

libsqlite3-dev libogg-dev libasound-dev python-sqlite libglew-dev libcurl3 libcurl4-openssl-dev x11proto-xinerama-dev libxinerama-dev libxrandr-dev libxrender-

dev libmad0-dev libogg-dev libvorbisenc2 libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev

libfontconfig-dev libbz2-dev libboost-dev libfaac-dev libenca-dev libxt-dev libxtst-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev

libsamplerate-dev libmms-dev libmpeg3-dev libfaad-dev libflac-dev libiso9660-dev libass-dev libssl-dev fp-compiler gdc libwavpack-dev libmpeg2-4-dev

libmicrohttpd-dev libmodplug-dev libboost-thread-dev -y -q

And now this will take some time....
Code:
./sxgb.sh refresh

The installation was refreshed took around 30min after this i could start upp spotifxbmc Big Grin

Thanks to Flanhare's script and IAmNotAUser 's post.
I have written the steps in the order i done them and that worked for me. If you want to do the steps in another order it's up to you.

And also a big thanks to Akeeze, this is the best thing happening to xbmc since sliced bread Nod

Best regards.

Will try all this tomorrow seems like a perfect guide for me! =)


Can't get Windows compile to work - MDHog - 2011-09-11

kooolkat357 Wrote:@Gr8rtek

Thanks allot for your nice Windows compiling/installation guide Smile

Helped me out allot, got spotifyXbmc 2 work @ first try!

Edit: Spotify works but every other file online & offline will not play! Any advice?

Gr8rtek--thanks for detailed Windows compile guide. Unfortunately for me it seems to fail at step 15 with the following error

cannot stat 'xbmc_ asap.dll" No such file or directory
failed to compile /xbmc/system/players/papplayer/xbmc_asap.dll

Any thoughts?