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)



- Puffytroll - 2010-11-19

Yes, i know, but I use Lordmozillas patch. There the lines are uncommented.


- Puffytroll - 2010-11-19

@akezeke or Lordmozilla

XBMC Dharma rc1 is out. Can you fix the patch so it works with this new realease?

I think minor tweaks will do the trick.

This happends when im patching:
Code:
patch -p 1 < spotyxbmc_for_dharma_beta4.patch
patching file Makefile.in
Hunk #1 succeeded at 475 (offset -1 lines).
patching file xbmc/AdvancedSettings.cpp
Hunk #1 succeeded at 59 (offset -2 lines).
Hunk #2 succeeded at 671 (offset 83 lines).
patching file xbmc/AdvancedSettings.h
Hunk #1 succeeded at 83 (offset 11 lines).
patching file xbmc/Application.cpp
Hunk #1 succeeded at 22 with fuzz 1.
Hunk #2 succeeded at 1123 with fuzz 2 (offset -2 lines).
Hunk #3 succeeded at 3300 (offset -32 lines).
patching file xbmc/cores/paplayer/CodecFactory.cpp
patching file xbmc/cores/paplayer/Makefile.in
patching file xbmc/cores/paplayer/PAPlayer.cpp
patching file xbmc/cores/paplayer/spotifyCodec.cpp
patching file xbmc/cores/paplayer/spotifyCodec.h
patching file xbmc/FileSystem/Directory.cpp
patching file xbmc/FileSystem/MusicDatabaseDirectory.cpp
patching file xbmc/GUIDialogContextMenu.h
patching file xbmc/GUIMediaWindow.cpp
patching file xbmc/GUIViewStateMusic.cpp
patching file xbmc/GUIWindowMusicNav.cpp
patching file xbmc/Makefile.in
patching file xbmc/MusicDatabase.cpp
patching file xbmc/MusicDatabase.h
patching file xbmc/Settings.cpp
Hunk #1 FAILED at 108.
1 out of 1 hunk FAILED -- saving rejects to file xbmc/Settings.cpp.rej
patching file xbmc/spotify/api.h
patching file xbmc/spotinterface.cpp
patching file xbmc/spotinterface.h
patching file xbmc/utils/GUIInfoManager.cpp
Hunk #2 succeeded at 4354 (offset 31 lines).
patching file xbmc/XBApplicationEx.cpp

And here are the .rej file:

Code:
--- xbmc/Settings.cpp    2010-10-30 11:24:25.558778220 +0200
+++ xbmc/Settings.cpp    2010-10-31 02:36:59.169669495 +0200
@@ -108,7 +108,7 @@
   m_bNonLinStretch = false;

   m_pictureExtensions = ".png|.jpg|.jpeg|.bmp|.gif|.ico|.tif|.tiff|.tga|.pcx|.cbz|.zip|.cbr|.rar|.m3u|.dng|.nef|.cr2|.crw|.orf|.arw|.erf|.3fr|.dcr|.x3f|.mef|.raf|.mrw|.pef|.sr2|.rss";
-  m_musicExtensions = ".nsv|.m4a|.flac|.aac|.strm|.pls|.rm|.rma|.mpa|.wav|.wma|.ogg|.mp3|.mp2|.m3u|.mod|.amf|.669|.dmf|.dsm|.far|.gdm|.imf|.it|.m15|.med|.okt|.s3m|.stm|.sfx|.ult|.uni|.xm|.sid|.ac3|.dts|.cue|.aif|.aiff|.wpl|.ape|.mac|.mpc|.mp+|.mpp|.shn|.zip|.rar|.wv|.nsf|.spc|.gym.adx|.dsp|.adp|.ymf|.ast|.afc|.hps|.xsp|.xwav|.waa|.wvs|.wam|.gcm|.idsp|.mpdsp|.mss|.spt|.rsd|.mid|.kar|.sap|.cmc|.cmr|.dmc|.mpt|.mpd|.rmt|.tmc|.tm8|.tm2|.oga|.url|.pxml|.tta|.rss|.cm3|.cms|.dlt|.brstm";
+  m_musicExtensions = ".nsv|.m4a|.flac|.aac|.strm|.pls|.rm|.rma|.mpa|.wav|.wma|.ogg|.mp3|.mp2|.m3u|.mod|.amf|.669|.dmf|.dsm|.far|.gdm|.imf|.it|.m15|.med|.okt|.s3m|.stm|.sfx|.ult|.uni|.xm|.sid|.ac3|.dts|.cue|.aif|.aiff|.wpl|.ape|.mac|.mpc|.mp+|.mpp|.shn|.zip|.rar|.wv|.nsf|.spc|.gym.adx|.dsp|.adp|.ymf|.ast|.afc|.hps|.xsp|.xwav|.waa|.wvs|.wam|.gcm|.idsp|.mpdsp|.mss|.spt|.rsd|.mid|.kar|.sap|.cmc|.cmr|.dmc|.mpt|.mpd|.rmt|.tmc|.tm8|.tm2|.oga|.url|.pxml|.tta|.rss|.cm3|.cms|.dlt|.brstm|.spotify";
   m_videoExtensions = ".m4v|.3g2|.3gp|.nsv|.tp|.ts|.ty|.strm|.pls|.rm|.rmvb|.m3u|.ifo|.mov|.qt|.divx|.xvid|.bivx|.vob|.nrg|.img|.iso|.pva|.wmv|.asf|.asx|.ogm|.m2v|.avi|.bin|.dat|.mpg|.mpeg|.mp4|.mkv|.avc|.vp3|.svq3|.nuv|.viv|.dv|.fli|.flv|.rar|.001|.wpl|.zip|.vdr|.dvr-ms|.xsp|.mts|.m2t|.m2ts|.evo|.ogv|.sdp|.avs|.rec|.url|.pxml|.vc1|.h264|.rcv|.rss|.mpls|.webm|.bdmv";
   // internal music extensions
   m_musicExtensions += "|.sidstream|.oggstream|.nsfstream|.asapstream|.cdda";



- momoski - 2010-11-20

If Akezeke or Lordmozilla are going to patch for the latest version, I would like to humbly request then to make it work with libspotify 0.0.6.


- stigroar - 2010-11-20

I reinstalled libspotify, actually followed the entire guide from step 1 to 12, except from reobtaining XBMC source (step 5). These are the errors I get in the end when compiling (step 12): http://pastebin.com/Eg7PGcFy


- momoski - 2010-11-20

I will be busy in the afternoon, but why did u not obtain the latest xbmc source? And can you also pastebin your api.h file in the meantime.


- stigroar - 2010-11-20

I tried the whole process again, this time with also redownloading the xbmc source. When compiling (make), the system freezed. Now, when restarting, I get a black screen with:

Ubuntu 10.04.1 LTS XBMCLive ttyl
XBMCLive login:

I type my username and password, but how do I get back into the graphical user interface?!


- Puffytroll - 2010-11-20

Try to log inn and type: startx


- arfoll - 2010-11-21

There was only one line wrong ;-)- if you looked at the .rej file it's just the codec list has changed, nothing else. (does make you wonder why they are changing that list in last beta -> release candidate but...)

Either way I've updated it for RC1:
http://www.madeo.co.uk/?p=647

Enjoy -

- this is lordmozilla, just changed my username Smile


- stigroar - 2010-11-21

Puffytroll Wrote:Try to log inn and type: startx
Error:
Quote:X: user not authorized to rund the X server, aborting.
giving up.
xinit: No such file or directory (errno 2): unable to connect to X server
xinit: No such process (errno 3): Server error.



- Puffytroll - 2010-11-21

arfoll Wrote:There was only one line wrong ;-)- if you looked at the .rej file it's just the codec list has changed, nothing else. (does make you wonder why they are changing that list in last beta -> release candidate but...)

Either way I've updated it for RC1:
http://www.madeo.co.uk/?p=647

Enjoy -

- this is lordmozilla, just changed my username Smile

The download link is broken Tongue


- Puffytroll - 2010-11-21

stigroar Wrote:Error:

try: sudo startx


- stigroar - 2010-11-21

Error:

sudo: must be setuid root


- Puffytroll - 2010-11-22

Hi. Is it a hard job to code a handler for local files in the patch?? Its frustrating that is crash when i try a playlist with local files Tongue


- stigroar - 2010-11-23

Puffytroll has been so nice to help my over Skype!

I have installed libspotify 0.0.3 (to both /usr/ and /usr/local) and lordmozilla's xbmc source. Puffytroll sent me his slightly upgraded patch which I used. The patching worked fine.

Then i ran ./bootstrap && ./configure && make -j 5 -S

I exited XBMC and commanded startx && fluxbox. From the fluxbox commander I ran ./xbmc.bin. Here I could browse my playlists and search for songs. When I start a song however, I return to fluxbox with the following message (a part of the left side is outside of my screen):

..eviceOpen: opening HW in mode 0
..eviceOpen: Create file failed
..entation fault

Puffytroll tells me that it says "segmentation fault", and that he doesn't know what to do. Any of you others who know?


pvr version of xbmc - moksha - 2010-11-23

Hi Im trying to apply the patch to the pvr-testing2 branch of xbmc.

Code:
patching file xbmc/XBApplicationEx.cpp
patching file xbmc/cores/paplayer/Makefile.in
Hunk #1 FAILED at 9.
1 out of 1 hunk FAILED -- saving rejects to file xbmc/cores/paplayer/Makefile.in.rej
patching file xbmc/cores/paplayer/CodecFactory.cpp
Hunk #2 succeeded at 57 (offset 1 line).
Hunk #3 FAILED at 140.
1 out of 3 hunks FAILED -- saving rejects to file xbmc/cores/paplayer/CodecFactory.cpp.rej
patching file xbmc/cores/paplayer/PAPlayer.cpp
patching file xbmc/Application.cpp
Hunk #1 succeeded at 22 with fuzz 1.
Hunk #2 succeeded at 1159 with fuzz 2 (offset 37 lines).
Hunk #3 succeeded at 3375 with fuzz 2 (offset 37 lines).
patching file xbmc/AdvancedSettings.cpp
Hunk #1 succeeded at 60 (offset 1 line).
Hunk #2 succeeded at 579 (offset -92 lines).
patching file xbmc/MusicDatabase.h
patching file xbmc/FileSystem/Directory.cpp
Hunk #1 FAILED at 144.
1 out of 1 hunk FAILED -- saving rejects to file xbmc/FileSystem/Directory.cpp.rej
patching file xbmc/FileSystem/MusicDatabaseDirectory.cpp
patching file xbmc/MusicDatabase.cpp
patching file xbmc/Makefile.in
patching file xbmc/GUIViewStateMusic.cpp
patching file xbmc/GUIDialogContextMenu.h
Hunk #1 succeeded at 127 (offset 17 lines).
patching file xbmc/GUIWindowMusicNav.cpp
Hunk #3 succeeded at 553 (offset -3 lines).
patching file xbmc/AdvancedSettings.h
Hunk #1 succeeded at 71 with fuzz 2 (offset -12 lines).
patching file xbmc/Settings.cpp
Hunk #1 FAILED at 106.
1 out of 1 hunk FAILED -- saving rejects to file xbmc/Settings.cpp.rej
patching file xbmc/GUIMediaWindow.cpp
Hunk #2 succeeded at 901 (offset -11 lines).
patching file xbmc/utils/GUIInfoManager.cpp
Hunk #1 succeeded at 34 (offset 1 line).
patch unexpectedly ends in middle of line
Hunk #2 succeeded at 4768 with fuzz 1 (offset 414 lines).
Later while compiling i get:

Code:
xbmc/xbmc.a(spotinterface.o): In function `SpotifyInterface':
/usr/local/src/xbmc/xbmc/spotinterface.cpp:697: undefined reference to `SpotifyCodec::cb_musicDelivery(sp_session*, sp_audioformat const*, void const*, int)'
/usr/local/src/xbmc/xbmc/spotinterface.cpp:701: undefined reference to `SpotifyCodec::cb_endOfTrack(sp_session*)'
/usr/local/src/xbmc/xbmc/spotinterface.cpp:697: undefined reference to `SpotifyCodec::cb_musicDelivery(sp_session*, sp_audioformat const*, void const*, int)'
/usr/local/src/xbmc/xbmc/spotinterface.cpp:701: undefined reference to `SpotifyCodec::cb_endOfTrack(sp_session*)'
xbmc/cores/paplayer/paplayer.a(PAPlayer.o): In function `PAPlayer::ProcessPAP()':
/usr/local/src/xbmc/xbmc/cores/paplayer/PAPlayer.cpp:557: undefined reference to `SpotifyCodec::playerIsFree'
xbmc/cores/paplayer/paplayer.a(CodecFactory.o): In function `CodecFactory::CreateCodec(CStdStr<char> const&)':
/usr/local/src/xbmc/xbmc/cores/paplayer/CodecFactory.cpp:63: undefined reference to `SpotifyCodec::SpotifyCodec()'
collect2: ld returned 1 exit status
make: *** [xbmc.bin] Error 1

Is this related to the branch Im using? Its a fairly new release of the Dharma svn.