Kodi Community Forum
[WIP] XBMC + Spotify = True (an XBMC implementation that uses Spotify's official API) - Printable Version

+- Kodi Community Forum (http://forum.kodi.tv)
+-- Forum: Announcements, Info, and General Discussion (/forumdisplay.php?fid=85)
+--- Forum: Kodi General Discussion (/forumdisplay.php?fid=6)
+--- Thread: [WIP] XBMC + Spotify = True (an XBMC implementation that uses Spotify's official API) (/showthread.php?tid=67012)



- Tompen - 2011-12-10 17:50

tommienu Wrote:I'm running this on OpenELEC and i can't seem to find a crashlog :/ I asked around in #openelec on freenode and neither of them knew where (or if) the crashlogs are located. I also ran "find / -name '*crashlog*'" on the system and came up with nothing.

I did a complete recompile/install and spotify works great until i do the first restart, after that it maxes the CPU on reboot (once XBMC loads) and hangs (as in black screen and XBMC-restart) after maybe 5-6 seconds.

From this wiki page it seems XBMC needs GDB to create a crashlog on linux.
http://wiki.xbmc.org/index.php?title=HOW-TO:Submit_a_proper_bug_report#Linux

GDB is not included in OpenELEC by default, you need to compile a debug build to get that package included. Sent a pm to you on the OpenELEC forum with instruction how-to compile a debug build.


Trying to get it running on ATV(1st Gen) - agzela - 2011-12-11 12:05

Im getting this after enabling spotify


Crash report:

Program terminated with signal 11, Segmentation fault.

#0 addon_music_spotify::StarredBackgroundLoader::Process (this=0xb338ed30)
at spotyXBMC/playlist/StarredBackgroundLoader.cpp:54
in spotyXBMC/playlist/StarredBackgroundLoader.cpp

XBMC.log:(Last lines before XBMC crash)

02:49:45 T:3000122256 DEBUG: spotifylog: init playliststore
02:49:45 T:3000122256 DEBUG: spotifylog: updating main music menu
02:49:45 T:3000122256 DEBUG: spotifylog: Logged in!
02:49:45 T:3000122256 DEBUG: spotifylog: 09:49:45.427 I [offline-mgr:2143] Storage has been cleaned
02:49:45 T:3000122256 DEBUG: spotifylog: adding playlist
02:49:45 T:3000122256 DEBUG: Previous line repeats 4 times.
02:49:45 T:3000122256 DEBUG: spotifylog: pc loaded
02:49:45 T:3000122256 DEBUG: spotifylog: reload play
02:49:45 T:3000122256 DEBUG: spotifylog: reload play done
02:49:45 T:3000122256 DEBUG: spotifylog: updating playlist view
02:49:45 T:3000122256 DEBUG: spotifylog: Populate starred albums and artists
02:49:45 T:2949766032 DEBUG: Thread addon_music_spotify::StarredBackgroundLoader start, auto delete: 1
02:49:45 T:3000122256 DEBUG: spotifylog: m_starredList created
02:49:45 T:3000122256 DEBUG: spotifylog: All playlists loaded
02:49:45 T:3000122256 DEBUG: spotifylog: creating toplists
02:49:45 T:3000122256 DEBUG: spotifylog: updating toplistmenu
02:49:45 T:3000122256 DEBUG: spotifylog: playlists cb_state_change
02:49:45 T:3000122256 DEBUG: spotifylog: reload play
02:49:45 T:3000122256 DEBUG: spotifylog: reload play done
02:49:45 T:3000122256 DEBUG: spotifylog: updating playlist view
02:49:45 T:3000122256 DEBUG: spotifylog: playlists cb_state_change
02:49:45 T:3000122256 DEBUG: spotifylog: reload play
02:49:45 T:3000122256 DEBUG: spotifylog: reload play done
02:49:45 T:3000122256 DEBUG: spotifylog: updating playlist view
02:49:45 T:3000122256 DEBUG: spotifylog: playlists cb_state_change
02:49:45 T:3000122256 DEBUG: spotifylog: reload play
02:49:45 T:3000122256 DEBUG: spotifylog: reload play done
02:49:45 T:3000122256 DEBUG: spotifylog: updating playlist view


- sourbob - 2011-12-12 07:52

Anyone else have their artists show up in almost totally random order,instead of alphabetically?


- neoflex - 2011-12-12 10:40

Yep, I think it is sorted by spotify URI.


- akezeke - 2011-12-12 16:33

sourbob Wrote:Anyone else have their artists show up in almost totally random order,instead of alphabetically?

Thanks for pointing that out, fixed in the repo!

/David


- Tompen - 2011-12-12 17:17

edit: removed my post, it should probably be a pull request.


Compile error - jamtobo - 2011-12-14 01:05

I don't know if I should post my problems in this thread, but I'll give it a try.

I can't compile SPOTYXBMC2 for some reason. I've tried the guide and the fully automated build script provided earlier in this thread.

I have the following hardware setup:
ASUS AT3IONT-I DELUXE ION SOCKET 437 MINI-ITX

Code:
LD      xbmc.bin
xbmc/music/music.a(RadioBackgroundLoader.o): In function `addon_music_spotify::RadioBackgroundLoader::Process()':
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/radio/RadioBackgroundLoader.cpp:61: undefined reference to `sp_track_get_availability'
xbmc/music/music.a(SxArtist.o): In function `addon_music_spotify::SxArtist::detailsLoaded(sp_artistbrowse*)':
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/artist/SxArtist.cpp:146: undefined reference to `sp_track_get_availability'
xbmc/music/music.a(SearchResultBackgroundLoader.o): In function `addon_music_spotify::SearchResultBackgroundLoader::Process()':
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/search/SearchResultBackgroundLoader.cpp:70: undefined reference to `sp_track_get_availability'
xbmc/music/music.a(TopLists.o): In function `addon_music_spotify::TopLists::cb_toplistTracksComplete(sp_toplistbrowse*, void*)':
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/playlist/TopLists.cpp:169: undefined reference to `sp_track_get_availability'
xbmc/music/music.a(TopLists.o): In function `addon_music_spotify::TopLists::reLoadArtists()':
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/playlist/TopLists.cpp:64: undefined reference to `sp_session_user_country'
xbmc/music/music.a(TopLists.o): In function `addon_music_spotify::TopLists::reLoadTracks()':
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/playlist/TopLists.cpp:78: undefined reference to `sp_session_user_country'
xbmc/music/music.a(TopLists.o): In function `addon_music_spotify::TopLists::reLoadAlbums()':
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/playlist/TopLists.cpp:71: undefined reference to `sp_session_user_country'
xbmc/music/music.a(SxPlaylist.o): In function `addon_music_spotify::SxPlaylist::reLoad()':
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/playlist/SxPlaylist.cpp:112: undefined reference to `sp_track_get_availability'
xbmc/music/music.a(PlaylistStore.o): In function `PlaylistStore':
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/playlist/PlaylistStore.cpp:47: undefined reference to `sp_playlist_set_in_ram'
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/playlist/PlaylistStore.cpp:50: undefined reference to `sp_playlist_set_in_ram'
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/playlist/PlaylistStore.cpp:51: undefined reference to `sp_playlist_set_in_ram'
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/playlist/PlaylistStore.cpp:47: undefined reference to `sp_playlist_set_in_ram'
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/playlist/PlaylistStore.cpp:50: undefined reference to `sp_playlist_set_in_ram'
xbmc/music/music.a(PlaylistStore.o):/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/playlist/PlaylistStore.cpp:51: more undefined references to `sp_playlist_set_in_ram' follow
xbmc/music/music.a(StarredBackgroundLoader.o): In function `addon_music_spotify::StarredBackgroundLoader::Process()':
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/playlist/StarredBackgroundLoader.cpp:65: undefined reference to `sp_track_get_availability'
xbmc/music/music.a(Session.o): In function `addon_music_spotify::Session::connect()':
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/session/Session.cpp:114: undefined reference to `sp_session_set_connection_type'
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/session/Session.cpp:115: undefined reference to `sp_session_set_connection_rules'
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/session/Session.cpp:116: undefined reference to `sp_session_set_volume_normalization'
xbmc/music/music.a(SxThumb.o): In function `SxThumb':
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/thumb/SxThumb.cpp:38: undefined reference to `sp_link_create_from_image'
/home/xbmc/setup/spotyxbmc2/xbmc/music/spotyXBMC/thumb/SxThumb.cpp:38: undefined reference to `sp_link_create_from_image'
collect2: ld returned 1 exit status
make: *** [xbmc.bin] Error 1

lsb_release -a
Code:
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 10.04.2 LTS - XBMCLive Dharma
Release:        10.04
Codename:       lucid

uname -a
Code:
Linux XBMCLive 2.6.32-29-generic #58-Ubuntu SMP Fri Feb 11 19:00:09 UTC 2011 i686 GNU/Linux



- Sealside - 2011-12-14 10:28

Had the same error myself

- Make sure you have libspotify 10 and not the 0.0.8 or previous versions.
- Make sure you do a full uninstall of 0.0.8

You can do a find /usr/ -name "libspotify*" make sure they are all correct and that you don't have any conflicts between different libspotify version.s


- jamtobo - 2011-12-14 22:41

Thank you SealSide! That did the trick.
Unfortunately I came across another compile error:

Code:
/home/xbmc/spotyxbmc2/xbmc/guilib/GraphicContext.h:245: warning: âg_graphicsContextâ defined but not used
make[1]: *** [spotyXBMC/Addon.music.spotify.o] Error 1
make: *** [xbmc/music/music.a] Error 2



- sidetaske - 2011-12-15 00:01

Tompen Wrote:Hi sidetaske, May I suggest you take a look at this post.

Thanks for this tip.. I just tried to compile this way and it worked a charm. Just want to point out a few things if anybody is going the same way as me. I cloned the master pvr git repository and merged spotyxbmc2 into this (the reverse way of the original tip) and used ppa:lars-opdenkamp/pvr-depends for build dependencies, but it did not give me libvdpau-dev and libcec-dev. I had to manually add those by sudo apt-get install libvdpau-dev libcec-dev. Without these dependencies you wont get vdpau decoding or libcec

The only merge conflict for me was MusicOSD.xml where Akezeke has fixed the crash on exit so it was just a small edit.

To Akezeke and everybody contributing to this thread, Thank You for excellent work!


- Novin - 2011-12-17 22:22

Installed it today. Works but got a crash after 15 minutes. Will submit some kind of report to that later... to here or somewhere else?

The GUI also lags like crazy. The RSS feed skips a couple of characters every 3 seconds or so. Why is this I wonder..

Using todays git + Ubuntu 10.10 + Asrock ION 330.

Gui-flow & hw-accel in movies (vdpau) worked fine in the 10.10-version of XBMC I used before.


- KJThaDon - 2011-12-18 05:18

Can someone help me out please. I got everything done according to this guide. http://forum.xbmc.org/showpost.php?p=882046&postcount=530

And I am getting error when compiling in the last step BuildSetup.bat


This is the log.

Code:
Build started 12/17/2011 10:12:05 PM.
     1>Project "C:\XBMC\project\VS2010Express\XBMC.vcxproj" on node 3 (build target(s)).
     1>InitializeBuildStatus:
         Touching "XBMC\Release (DirectX)\objs\XBMC.unsuccessfulbuild".
       CustomBuild:
         Performing Custom Build Tools
         ECHO is off.
                 1 file(s) copied.
                 1 file(s) copied.
         FC: cannot open ..\..\XBMC\WIN32\GIT_REV.H - No such file or folder
        
       ClCompile:
         C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /I..\..\ /I..\..\xbmc\ /I..\..\xbmc\win32\ /I..\..\xbmc\cores\dvdplayer /I..\..\lib /I..\..\lib\ffmpeg /I"..\..\lib\ffmpeg\include-xbmc-win32" /I..\..\lib\liblame\include /I..\..\lib\libUPnP\Platinum\Source\Devices\MediaRenderer /I..\..\lib\libUPnP\Platinum\Source\Devices\MediaConnect /I..\..\lib\libUPnP\Platinum\Source\Devices\MediaServer /I..\..\lib\libUPnP\Platinum\Source\Platinum /I..\..\lib\libUPnP\Platinum\Source\Core /I..\..\lib\libUPnP\Neptune\Source\Core /I..\..\lib\libUPnP\Neptune\Source\System\Win32 /I..\..\lib\win32\pcre /I..\..\lib\win32 /Zi /nologo /W3 /WX- /MP /Ox /Ot /Oy /D TARGET_WINDOWS /D _WINDOWS /D _MSVC /D WIN32 /D NDEBUG /D _WIN32_WINNT=0x0501 /D NTDDI_VERSION=0x05010300 /D NOMINMAX /D _USE_32BIT_TIME_T /D HAS_DX /D __STDC_CONSTANT_MACROS /D _VC80_UPGRADE=0x0710 /D _MBCS /GF- /Gm- /EHa /MT /GS /Gy- /arch:SSE /fp:precise /Zc:wchar_t /Zc:forScope /Yc"pch.h" /Fp"XBMC\Release (DirectX)\objs\XBMC.pch" /Fo"XBMC\Release (DirectX)\objs\\" /Fd"XBMC\Release (DirectX)\objs\vc100.pdb" /Gd /TP /wd4996 /FIpch.h /analyze- /errorReport:prompt ..\..\xbmc\win32\pch.cpp /MP
         pch.cpp
     1>c:\xbmc\xbmc\win32\pch.h(20): fatal error C1083: Cannot open include file: 'D3DX9.h': No such file or directory
     1>Done Building Project "C:\XBMC\project\VS2010Express\XBMC.vcxproj" (build target(s)) -- FAILED.

Build FAILED.

Time Elapsed 00:00:09.77



- yallah - 2011-12-18 14:35

Hi All,

Is itpossible to integrate JSON command, need create remote application with ipad and can only use JSON command for browse, search ...

Regards


- neoflex - 2011-12-18 15:04

Is it possible yes, but not done.
For the moment, only the GetSongs and GetAlbums methods have been modified to integrate spotify.
You can have a look at https://github.com/akezeke/spotyxbmc2/commit/12c9417d00650f6ba67bcaaefafafa21577aca0b to see how to use them.


- yallah - 2011-12-18 15:23

oh thx,

it's only for feedback, no way yet to search artist,song or other ?