Skip to main content

Notice

If you are using a Hotmail or Outlook email address, please change it now, as Microsoft is rejecting all email from our service outright.
Topic: Spotify Integration (foo_spotify) (Read 2247 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Spotify Integration (foo_spotify)

Spotify Integration    

fb2k component that allows to play tracks from Spotify.

Features:
 - Import of albums and playlists.
 - Album art fetching.
 - foo_acfu integration.

Prerequisites
 - Pentium 4 or newer processor that supports SSE2.
 - Windows 7 or later.
 - foobar2000 v1.3.17 or later.
 - Spotify Premium account.
 
Installation
 - Remove `foo_spotify_input` component if present.
 - Download the latest release (you only need `foo_spotify.fb2k-component`).
 - Install the component using the following instructions.
 - Authorize the component via `Preferences`>`Tools`>`Spotify Integration`.

FAQ
>> Link <<

Links
 - Download link
 - Homepage
 - Changelog
 - Current tasks and plans
 - Nightly build

Credits
 - Respective authors of the code being used in this project.

Re: Spotify Integration (foo_spotify)

Reply #1
@wcs13 , can you try the Nightly build? It should fix your LS login issues.
Also can you open the track via a direct URL, e.g. File > AddLocation... > https://open.spotify.com/track/28yOC8MxDYj87XFZM2FMiA ?


Re: Spotify Integration (foo_spotify)

Reply #3
I've been trying out this component a little bit, with mixed results. When it works it works great, but it often won't work for me. Here are some examples of both.
I put together a little test with one track, one album and one playlist. They are as follows:
Code: [Select]
Spotify URIs:
spotify:track:0nLiqZ6A27jJri2VCalIUs
spotify:album:7p3G0OCxtlWyJcPE1FxnyB
spotify:playlist:37i9dQZF1DXagb3XZSnOQ8

Links:
https://open.spotify.com/track/0nLiqZ6A27jJri2VCalIUs?si=t8_Nb3S1T8qzD_YeasU6NA
https://open.spotify.com/album/7p3G0OCxtlWyJcPE1FxnyB?si=5FI95QXySd2CAjgDCo3XEQ
https://open.spotify.com/playlist/37i9dQZF1DXagb3XZSnOQ8?si=XX2PKL6tTeGsY_Nsf017Jw


I tested adding these with "Add location...".
The track works great, both the URI and the link.
The album works with the link but not the URI. Error text from the console when I try to play the URI:
Code: [Select]
Opening track for playback: "spotify:album:7p3G0OCxtlWyJcPE1FxnyB"
Unable to open item for playback (Object not found):
"spotify:album:7p3G0OCxtlWyJcPE1FxnyB"


The playlist won't work at all. The URI gives the same kind of message as the album URI, while the album link brings up a popup window with this text:
Code: [Select]
The following error(s) occurred during loading of the location(s):
[json.exception.type_error.302] type must be string, but is null

Hope this can be helpful.
I also have a question. What bitrate does the component stream in?
Thanks for your work so far.

Re: Spotify Integration (foo_spotify)

Reply #4
@blindpainkiller , thanks for testing and reporting those bugs!

- "Can't play URI": this is a fb2k limitation - it's not possible (or rather REALLY hard) to use an arbitrary string to load multiple tracks. It works for the track, because, well, it's a single track =)
   It should not be a big problem though, since every album/playlist/track on Spotify has a `Copy * Link` button.
- "Playlist fails with json error": yup, it's a bug. https://github.com/TheQwertiest/foo_spotify/issues/3
- "Track bit-rate": I actually didn't know that it was possible to display or change it =) https://github.com/TheQwertiest/foo_spotify/issues/4, https://github.com/TheQwertiest/foo_spotify/issues/5

Re: Spotify Integration (foo_spotify)

Reply #5
@TheQwertiest, thanks for all the info and the clarifications.

Re: Spotify Integration (foo_spotify)

Reply #6
@TheQwertiest
Great component and a nice side-track from smp v2 development!

I've been using the nightly build and adding the Spotify link for tracks, albums and playlists works great. Thanks. Any chance of getting the artist link working too?

Re: Spotify Integration (foo_spotify)

Reply #7
Great component and a nice side-track from smp v2 development!
I've been using the nightly build and adding the Spotify link for tracks, albums and playlists works great. Thanks.
Haha, thanks =)
I was getting a bit burned out with v2 rewrite, so I needed something light to distract myself with...

Any chance of getting the artist link working too?
Way ahead of you :P
See https://github.com/TheQwertiest/foo_spotify/projects/1 for all the planed features.
As usual no ETA for any of them, esp. since I want to switch back to SMP development once all initial bugs here are ironed out.


Re: Spotify Integration (foo_spotify)

Reply #9
Middle of a long (60+tracks) Spotify playlist. This popped up but the music/list was not interrupted.

Unable to open item for playback (sp_session_player_load failed: The track cannot be played):
"spotify:track:6sHrxsewgTMPs2Di4x636C"



Re: Spotify Integration (foo_spotify)

Reply #10
I've found the track. It's not available even when played as a single track. I'm guessing it's an error in the playlist so probably nothing to worry about.

Re: Spotify Integration (foo_spotify)

Reply #11
@Black_Over_Bills_Mothers , this is error is reproducible on my end as well, but it's not something that I can fix: I've checked the track manually and it seems that it can't be played outside of US and CA . I will check if it's possible to get a more verbose error message though.

Re: Spotify Integration (foo_spotify)

Reply #12
Version: 1.0.2
Link: https://github.com/TheQwertiest/foo_spotify/releases/tag/v1.0.2
Changelog:
Spoiler (click to show/hide)

Re: Spotify Integration (foo_spotify)

Reply #13
Moved to 1.6.2b3 of foobar and 1.0.2 of this component and can't get any tracks to play. All generate the popup:

Unable to open item for playback (sp_session_player_load failed: The track cannot be played):
"spotify:track:6sHrxsewgTMPs2Di4x636C"


Re: Spotify Integration (foo_spotify)

Reply #14
Okay after re-boot. Strange!

Re: Spotify Integration (foo_spotify)

Reply #15
Would file re-linking be a solution to the unavailable tracks relating to user's country?

Re: Spotify Integration (foo_spotify)

Reply #16
@TheQwertiest, thanks a lot, version 1.0.2 works great. Two things that might be good for others to know though.
Firstly, you can't convert tracks from Spotify, which I guess is a limitation/concious choice. Secondly, if you have foo_youtube installed and have youtube-dl active, Spotify URLs won't reach the Spotify component and therefore won't work.

Re: Spotify Integration (foo_spotify)

Reply #17
Would file re-linking be a solution to the unavailable tracks relating to user's country?
Only partially: track relinking only works when there is a version of track that is available in user's country.
See https://developer.spotify.com/documentation/general/guides/track-relinking-guide/ for more info.

Re: Spotify Integration (foo_spotify)

Reply #18
@TheQwertiest, thanks a lot, version 1.0.2 works great. Two things that might be good for others to know though.
Firstly, you can't convert tracks from Spotify, which I guess is a limitation/concious choice. Secondly, if you have foo_youtube installed and have youtube-dl active, Spotify URLs won't reach the Spotify component and therefore won't work.
Yes, decoding limitation is a conscious design choice. While I will not actively combat ripping of Spotify music (there are a lot of such tools available on the internet anyway), I will not go out of my way to make it easier either =)
Thanks for YT dl tip! I will add it to the FAQ.

Re: Spotify Integration (foo_spotify)

Reply #19
@TheQwertiest, thanks a lot, version 1.0.2 works great. Two things that might be good for others to know though.
Firstly, you can't convert tracks from Spotify, which I guess is a limitation/concious choice. Secondly, if you have foo_youtube installed and have youtube-dl active, Spotify URLs won't reach the Spotify component and therefore won't work.
Yes, decoding limitation is a conscious design choice. While I will not actively combat ripping of Spotify music (there are a lot of such tools available on the internet anyway), I will not go out of my way to make it easier either =)
Thanks for YT dl tip! I will add it to the FAQ.
Ok, that's what I thought.
Another question. The Spotify client has a setting to normalize tracks which seems to work like ReplayGain (they had a strange compression thing earlier, but that changed some years ago). Is the info for normalization exposed in any way through the API so that it could be used in foobar?

Re: Spotify Integration (foo_spotify)

Reply #20
@blindpainkiller, opened a corresponding issue https://github.com/TheQwertiest/foo_spotify/issues/12

And no, it can't be used in fb2k, because normalization mechanism is not exposed in Spotify streaming library.

Re: Spotify Integration (foo_spotify)

Reply #21
One more enhancement suggestion, though this one is not very important (and probably not even possible to implement). In the client you can go into a "Private Session", which will not show others what you're playing and also will make what you're playing not affect your recommendations etc., which is useful sometimes.
Thanks again for the great work so far.

Re: Spotify Integration (foo_spotify)

Reply #22
One more enhancement suggestion, though this one is not very important (and probably not even possible to implement). In the client you can go into a "Private Session", which will not show others what you're playing and also will make what you're playing not affect your recommendations etc., which is useful sometimes.
Thanks again for the great work so far.
foo_spotify does not use Spotify Connect, hence nobody can see what track you are currently playing anyway =)
That said it might still affect recommendations (hard to test/verify that), hence I'll add the option: https://github.com/TheQwertiest/foo_spotify/issues/13

Re: Spotify Integration (foo_spotify)

Reply #23
@all : FYI, both of these two advanced prefs must be set to 0, or foo_spotify won't play music no matter what you try :
- Advanced > Playback > Buffering > Read-ahead for local files
- Advanced > Playback > Buffering > Full file buffering up to
Source : https://hydrogenaud.io/index.php?topic=119973.msg988798#msg988798

Re: Spotify Integration (foo_spotify)

Reply #24
Thanks for sharing that here, I had the same issue. But now is works!
In theory, there is no difference between theory and practice. In practice there is.

 
SimplePortal 1.0.0 RC1 © 2008-2020