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)



- alex84 - 2010-09-07

Hi there. I have hade spotify running before, then after THE update it broke... Have followed this threed closley and tried everything i can to make it work still no go. If not a friendly soul that has it working can give a more detail in how he/she made it work i gues that we have to wait for an official plugin. By all means this is most welcomed, an easy way to add it from the plugin page, kicks ass =) . Hoping to see this in a soon future and keep upp the nice work akezeke.

Best regards


- oro2 - 2010-09-22

Is there any updated information about when spotyxbmc can be released as an addon for Dharma?
The official spotyxbmc website hasn't been updated in 7 months..


- nilzen - 2010-09-23

oro2 Wrote:Is there any updated information about when spotyxbmc can be released as an addon for Dharma?
The official spotyxbmc website hasn't been updated in 7 months..

No it will not be released as an add-on for Dharma since there's no extension point for vfs (virtual file system) yet.


- WhiskeyJack - 2010-09-27

Was anybody able to get this compiled recently? I toyed around with it much of today and actually got to the point that it completes compiling. However, if I start XBMC with spotify enabled, it crashes immediately:
Code:
############## XBMC CRASH LOG ###############

################ SYSTEM INFO ################
Date: Mon Sep 27 20:49:56 CEST 2010
XBMC Options:
Arch: x86_64
Kernel: Linux 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 04:38:19 UTC 2010
Release:
    Distributor ID:     Ubuntu
    Description:        Ubuntu 9.10
    Release:    9.10
    Codename:   karmic
############## END SYSTEM INFO ##############

############### STACK TRACE #################
=====>  Core file: /home/whiskey/core
        =========================================
[New Thread 12296]
Core was generated by `/usr/local/lib/xbmc/xbmc.bin'.
Program terminated with signal 11, Segmentation fault.
#0  SpotifyInterface::processEvents (this=0x0) at spotinterface.cpp:80
80        if (m_isShowingReconnect && m_reconectingDialog->IsCanceled())

Any suggestions are greatly appreciated. I'll be happy to share my steps, but for now it only results in a crash Sad


- joeranjensen - 2010-10-01

nilzen Wrote:No it will not be released as an add-on for Dharma since there's no extension point for vfs (virtual file system) yet.

What do you mean about this? Will it never be released for Dharma?
I hope this addon is availiable in the future.


- soder - 2010-10-01

joeranjensen Wrote:What do you mean about this? Will it never be released for Dharma?
I hope this addon is availiable in the future.

I "think" he means that there is no way, at this moment, to include a music add-on to the normal music library.

Maybe they can make a script like Groovshark, or just a way to control the official spotify program that can be runned in the background of XBMC?

/Söder


- melat0nin - 2010-10-03

Hi all

I tried installing spoty using the readme over on GitHub, but this is what I get in the terminal:

Code:
media@media-server:~/spotyxbmc_alpha014_ubuntu32$ sudo ./install.sh
Looking for your xbmc.bin, this might take a while...
Reading package lists... Done
Building dependency tree
Reading state information... Done
libvorbisfile3 is already the newest version.
libvorbisfile3 set to manually installed.
make is already the newest version.
g++ is already the newest version.
g++ set to manually installed.
gcc is already the newest version.
gcc set to manually installed.
automake is already the newest version.
unzip is already the newest version.
Note, selecting libsdl1.2-dev instead of libsdl-dev
libasound2-dev is already the newest version.
Note, selecting libglew1.5-dev instead of libglew-dev
libcurl3 is already the newest version.
libcurl3 set to manually installed.
libvorbisenc2 is already the newest version.
libvorbisenc2 set to manually installed.
Note, selecting libfontconfig1-dev instead of libfontconfig-dev
Package libpng-dev is a virtual package provided by:
  libpng12-dev 1.2.37-1ubuntu0.2
You should explicitly select one to install.
E: Package libpng-dev has no installation candidate
mkdir: cannot create directory `/home/media/openspotify': File exists
./install.sh: line 15: git: command not found
./install.sh: line 17: cd: openspotify/libopenspotify: No such file or directory
make: *** No rule to make target `clean'. Stop.
make: *** No rule to make target `install'. Stop.
XBMC is installed
Copying binaries
Installation succesfull

The readme makes no reference to acquiring/installing/whatever libspotify or openspotify.

I'm running Ubuntu 9.10 and XBMC 9.11. Any help would be much appreciated Smile


- mtjerneld - 2010-10-05

soder Wrote:I "think" he means that there is no way, at this moment, to include a music add-on to the normal music library.

Maybe they can make a script like Groovshark, or just a way to control the official spotify program that can be runned in the background of XBMC?

/Söder

Why does it need to integrate with the library, wouldn't you just want it accessible through Music->Addons->Spotify?

//M


- soder - 2010-10-05

mtjerneld Wrote:Why does it need to integrate with the library, wouldn't you just want it accessible through Music->Addons->Spotify?

//M

I don't know, but I think that's what he meant.

The only Spotify solution that has been out there, was a version that was integrated into the library.

http://spotyxbmc.tumblr.com/

/Söder


- Mnuu - 2010-10-07

Real shame this project appears to have died


- Tompen - 2010-10-20

I have a working Dharma 3 windows installation with libSpotify, used the source from the spotyxbmc project. Did not need to modify anything, just integrated the spotyxbmc source with dharma source and compiled. So I would not say the project is dead, for me it´s finished Smile Just posting here to say thanks Smile


- alex84 - 2010-10-20

Tompen Wrote:I have a working Dharma 3 windows installation with libSpotify, used the source from the spotyxbmc project. Did not need to modify anything, just integrated the spotyxbmc source with dharma source and compiled. So I would not say the project is dead, for me it´s finished Smile Just posting here to say thanks Smile

If you could explain a litle more HOW you did this that would be extremly appreciated by many Nod


- Tompen - 2010-10-21

1. Compile XBMC from source code and get that working before you attempt to integrate spotify.

http://forum.xbmc.org/showthread.php?tid=61825

I used rev 34912 Dharma branch for my integration

2. Get a spotify premium account

3. Apply spotyxbmc diff to your source code, my diff for Windows XBMC Dharma branch rev 34912 is available here:

http://www.mediafire.com/?41t22k0r7nj7mu2

The only change I remember that I have done was to make libspotify to auto-reconnect to spotify when a network outage have dropped the connection. This is because I have a flaky wireless internet connection and I got tired about the question if I want to reconnect. I always want to reconnect to spotfy... Also I bumped the cache buffer from 2MB to 4MB

4.
Get a spotify developer key and put into spotinterface.cpp.
http://developer.spotify.com/en/libspotify/application-key/

So in spotinterface.cpp I replaced the line:
"NOTE: put your spotify development key here:"
with the lines for my application key.

The application key are around 20 lines of code looking like this:

0xD9, 0x7B, 0xC6, 0x99, 0xE3, 0x9C, 0xA7, 0x45, 0xB3, 0xA1, 0x26, 0xFC, 0x16, 0x29, 0x58, 0x3E,

5.
I downloaded libspotify ver 0.04 package from spotify.

I made sure libspotify.lib could be found by Visual C++ Express Edition compiler. I solved that by putting libspotify.lib file into:
project\BuildDependencies\lib

Also, in the source I created a folder xbmc\spotify and put the libspotify file api.h in this folder. To be clear, in the xbmc folder in the source there are subfolders addons, cdrip, cores and a few more. I created a spotify folder that have the file api.h

6.
I installed Dharma beta 3 on my computer, made sure music library was enabled and I had at least one song in my music library. Then I exit xbmc, overwrite the xbmc folder structure with my compiled version.

7.
In advancedsettings.xml I have the following:

<spotify>
<enable>true</enable>
<username>mySPOTIFYusername</username>
<password>myspotifypasswd</password>
<cachefolder>C:\temp\spotifycache</cachefolder>
<highbitrate>true</highbitrate>
<maxsearchartists>30</maxsearchartists>
<maxsearchalbums>30</maxsearchalbums>
<maxsearchtracks>150</maxsearchtracks>
</spotify>

Note: I found that the very first startup of xbmc.exe needs to have spotify enable set to false in advancedsettings.xml
Note2: the cachefolder need to exist

8. I copied libspotify.dll to the xbmc folder in program files (put it in the same folder as xbmc.exe)

9. Started xbmc.exe with spotify enable false, to make sure my compiled version of xbmc still functions without spotify enabled. Then enabled spotify in advancedsettings.xml

10. Started XBMC and enjoyed myself


- alex84 - 2010-10-26

Thanks for that info. To bad for me that if i get past point 1 i will get stucked on nr 3. Gues i have to wait until we see spotify in the addon menu, eighter by akeeze or someone else.

Cheers


- coendeurloo - 2010-10-26

Wish someone would pick this up and make an official plugin! That would be awesome.