[WIP] XBMC + Spotify = True (an XBMC implementation that uses Spotify's official API)

  Thread Rating:
  • 9 Votes - 4.22 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
aarnes Offline
Junior Member
Posts: 4
Joined: Jul 2012
Reputation: 0
Post: #951
Hi guys,

tried to read all 222 pages with posts but im note sure if the answer is posted yet:

Is there any Spotify client available for ATV2 and XBMC now?
find quote
Balthazar Online
Member
Posts: 96
Joined: Oct 2010
Reputation: 0
Location: Salina, KS
Post: #952
(2012-07-28 21:48)lunapark Wrote:  Where can I download this ad-on to my XBMC ?

This isn't a binary add on yet. You have to compile it yourself. See the first post for details.
find quote
dbaars Offline
Junior Member
Posts: 3
Joined: Jul 2012
Reputation: 0
Post: #953
I succesfully compiled spotyxbmc together with xbmc-pvr by creating a patch with the script I found on https://github.com/tompen-/OpenELEC.tv/t...fy_patches (branch Eden) and applying it to the Eden-pvr branch of xbmc-pvr.

This works great except for the fact that it keeps flooding my xbmc.log like CRAZY. It looks like it never ends, is there any way to turn these debug messages off of fix what is wrong?

Code:
21:07:45 T:140407899936512   DEBUG: spotifylog: loading spArtist
21:07:45 T:140407899936512   DEBUG: Previous line repeats 139 times.
21:07:45 T:140407899936512   DEBUG: spotifylog: lower artist ref
21:07:45 T:140407899936512   DEBUG: Previous line repeats 139 times.
21:07:45 T:140407899936512   DEBUG: spotifylog: Populate starred albums and artists thread start
21:07:45 T:140407899936512   DEBUG: spotifylog: Don't Be Shy
21:07:45 T:140407899936512   DEBUG: spotifylog: Good Girl
21:07:45 T:140407899936512   DEBUG: spotifylog: Disco Romancing

This hapens a lot of times within one second and it never stops:

Code:
21:07:58 T:140407899936512   DEBUG: spotifylog: Populate starred albums and artists thread start
21:07:58 T:140407899936512   DEBUG: spotifylog: Don't Be Shy
21:07:58 T:140407899936512   DEBUG: spotifylog: Good Girl
21:07:58 T:140407899936512   DEBUG: spotifylog: Disco Romancing
...

Configure string: ./configure --enable-libusb --enable-afpclient
Libspotify version: libspotify-10.1.16-Linux-x86_64-release
Ubuntu 12.04 LTS (amd64) with custom kernel (3.4.6)

Code:
user@tvserver:~/src/spotyxbmc2$ uname -ar
Linux tvserver 3.4.6-030406-generic #201207191609 SMP Thu Jul 19 20:11:13 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
find quote
dbaars Offline
Junior Member
Posts: 3
Joined: Jul 2012
Reputation: 0
Post: #954
(2012-07-29 21:33)dbaars Wrote:  I succesfully compiled spotyxbmc together with xbmc-pvr by creating a patch with the script I found on https://github.com/tompen-/OpenELEC.tv/t...fy_patches (branch Eden) and applying it to the Eden-pvr branch of xbmc-pvr.

This works great except for the fact that it keeps flooding my xbmc.log like CRAZY. It looks like it never ends, is there any way to turn these debug messages off of fix what is wrong?

Simple fix was compiling with --enable-debug=no, but maybe someone has to look into this issue so spotyxbmc users will not flood the spotify servers Wink

UPDATE: Master branch also has this problem, spits everything to STDOUT.
(This post was last modified: 2012-07-30 10:10 by dbaars.)
find quote
Tompen Offline
Junior Member
Posts: 46
Joined: Nov 2009
Reputation: 0
Post: #955
Hi dbaars, this is not a problem. It is working as designed. Let me explain:
In the spotyxbmc addon (same place you configure spotify username&password), there is a selection to output the spotify-related messages to a separate file.

These messages are only output when you run xbmc with debugging activated. The debug yes/no setting can be configured eiher inside XBMC.
Settings/System/Debugging. Or by the loglevel setting in your advancedsettings.xml file.
This file does not exist by default. It is advised to compile XBMC with --enable-debug=yes and turn off debugging in the gui (or the file) when it is not needed.
If debuggning does need to be enabled, you can select if you want the spotify messages in the xbmc.log or in a separate file. This selection is done in the spotyxbmc addon. You can also enable good looking artist fanart background from HTbackdrops in the addon.

On startup, spotyxbmc gets the information from spotify servers regarding all your starred songs, your playlists and the songs that are included in the playlists. So the messages should stop after a few minutes. The libspotify library creates a local cache on disk with much of this info to avoid asking spotify servers every time xbmc is started.

If you are using XBMC Eden, I recommend this patch for integration with PVR:
The patch you used had support for integration with AudioEngine. Audioengine does not exist in XBMC Eden.
Update: Sorry, I read too fast. if you created a patch by using the script with branch=Eden the Audoengine stuff is not included.
(This post was last modified: 2012-07-30 11:50 by Tompen.)
find quote
dbaars Offline
Junior Member
Posts: 3
Joined: Jul 2012
Reputation: 0
Post: #956
HI Tompen, thanks for your explanation. I am still wondering why it populates the starred albums and artists over and over again.
I looked into the code and it looks like the ArtistStore is not behaving as expected because it first loads several Artists (multiple loading spArtists messages) and then the artist gets deleted immediatly (getting multiple lower artist ref messages).

It is also possible that the thread is not detected properly and hence starts a new one, so there are just more and more and more threads doing the same thing. I'm going to look in the code further. Also I made some changes to make it work with the newest libspotify (12). Maybe I'll post a patch later.

UPDATE: I looked at the source code and then inspected the debug log, it seems that the "Populate starred albums and artists thread start" indeed never ends (no "Populate starred albums and artists thread done" message)
(This post was last modified: 2012-07-30 14:06 by dbaars.)
find quote
Tompen Offline
Junior Member
Posts: 46
Joined: Nov 2009
Reputation: 0
Post: #957
dbaars:
Please open a github issue report regarding "Populate starred albums and artists thread start never ends".
Please pastebin the xbmc.log, including the spotify messages. Then post the link.

Regarding libspotify 12, it would be great with help with improvement here on Github.
find quote
eeyore Offline
Junior Member
Posts: 27
Joined: Apr 2012
Reputation: 0
Post: #958
I just have a quick question - If I have an artist stored locally and stared on spotify with their music appear under the artist name in the library or will there be two listings? one with spotify music and one with local music?
find quote
Christer K Offline
Junior Member
Posts: 23
Joined: Feb 2011
Reputation: 0
Location: Sweden
Post: #959
Hi all.

I follwed the instructions that Gr8rtek wrote and I got stuck at #15

"15. Double-click the file named buildmingwlibs.bat"

The cmd window says " Path cannot be found"

I suppose I could change the path in the .bat, but I need to know what to insert

/Christer
(This post was last modified: 2012-08-21 16:07 by Christer K.)
find quote
KRKA01 Offline
Member
Posts: 90
Joined: Sep 2011
Reputation: 0
Location: Stockholm, Sweden
Post: #960
(2012-08-21 15:58)Christer K Wrote:  Hi all.

I follwed the instructions that Gr8rtek wrote and I got stuck at #15

"15. Double-click the file named buildmingwlibs.bat"

The cmd window says " Path cannot be found"

I suppose I could change the path in the .bat, but I need to know what to insert

/Christer

Make sure you have downloaded and installed the Microsoft DirectX SDK that are mentioned in the prereq. and by the way, if you only are going to create an installer, you can skip step 14 - 16.

//Krister
find quote
Post Reply