[WIP] XBMC + Spotify = True (an XBMC implementation that uses Spotify's official API) - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Announcements, Info, and General Discussion (/forumdisplay.php?fid=85)
+--- Forum: XBMC General Discussion (/forumdisplay.php?fid=6)
+--- Thread: [WIP] XBMC + Spotify = True (an XBMC implementation that uses Spotify's official API) (/showthread.php?tid=67012)
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
- Tompen - 2010-10-20 21:06
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 Just posting here to say thanks
- alex84 - 2010-10-20 22:51
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 Just posting here to say thanks
If you could explain a litle more HOW you did this that would be extremly appreciated by many
- Tompen - 2010-10-21 20:50
1. Compile XBMC from source code and get that working before you attempt to integrate spotify.
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:
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
Get a spotify developer key and put into spotinterface.cpp.
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,
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:
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
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.
In advancedsettings.xml I have the following:
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 09:12
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.
- coendeurloo - 2010-10-26 10:56
Wish someone would pick this up and make an official plugin! That would be awesome.
- newphreak - 2010-10-28 17:52
yeah, i hope somebody does, i want spotify in xbmc quite badly
- unknown_inc - 2010-10-29 11:59
newphreak Wrote:yeah, i hope somebody does, i want spotify in xbmc quite badly
- lordmozilla - 2010-10-31 22:13
I made a patch to compile it using dharma beta4 using libspotify 0.0.3. Works really well on Arch linux + meego.
enjoy - http://www.madeo.co.uk/?p=647
patch is here if you can't be bothered to read!
- soder - 2010-11-01 07:26
lordmozilla Wrote:I made a patch to compile it using dharma beta4 using libspotify 0.0.3. Works really well on Arch linux + meego.
I'm using the prebuild versions of XBMC from the SVN. Is it possible to get it work that what? Download a pre build version?
- lordmozilla - 2010-11-01 11:16
soder Wrote:I'm using the prebuild versions of XBMC from the SVN. Is it possible to get it work that what? Download a pre build version?
No, you have to download the sources and compile yourself. It's really not that hard though, you should try it!