Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Spotify plugin? (Read 37484 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Spotify plugin?

I want a completely integrated Spotify plugin for foobar2000, letting me use a single program for all my music needs.

Now with those API's from Spotify accessible, I'm almost sure it can be done. Pity I don't know much programming. But the libspotify API is said to give us the opportunity to make our own client program for playback (not sure whether the official Spotify client has to be installed). And the Metadata API should be able to let us search and browse the music.

If not doable with those official API's, it should certainly be doable with despotify. But I don't know, seems like a legal greyzone to me...

The working last.fm radio plugin tells me it should be doable in the other end. Does anyone know if this one works with some of the more advanced playback controls, for example stop after current and seek... I don't even know if that radio service is seekable!

I think it needs it's own UI panel, to make it usable. Please, don't force me to install columns UI. I like my UI the way it is, customized by myself but still default. But I can't see using Spotify without that having it's own search and view, on the other hand I don't think there's a need to handle Spotify playlists - as long as I can add Spotify music to my foobar playlists!

Of course the person who can program anything of this may chose to do it whatever way he wants to, I'm just saying what I want.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Another too long post from O8h7w, thankyou if you read it!
How short a signature am I allowed to have?

Spotify plugin?

Reply #1
This can only be done using despotify as there is no official Win32 API.
As you say, despotify is grayzone land, even if in their FAQ they specify they have not been terminated by Spotify (the company).
That can change at any time if they have to protect their interest, even if Spotify seems an OSS friendly company.
Or they may change the protocol and it no longer works. I'm not interested in doing a plugin myself but these are just
some warnings to whoever might be. It'd be better if there was an official win32 API.

 

Spotify plugin?

Reply #2
Right, that libspotify API is only available for Linux by now... But one could use the Metadata API, just getting foobar to say "You don't have this song, play in Spotify" when I search for something... no, that would be more annoying than helpful!

Well, despotify is a solution, as I said earlier I can't write it myself but I would use it. Sometimes, it seems to me that just using internet is considered barely legal...
How short a signature am I allowed to have?

Spotify plugin?

Reply #3
any improvements about this subject?

Spotify plugin?

Reply #4
Spotify is awesome, but it's not available in the most of the countries. However, it would be awesome to have grooveshark plugin for foobar.

http://listen.grooveshark.com/

I think it has even more music than Spotify, pure awesomeness. I would kill for that plugin.
Disregard the constabulary.

Spotify plugin?

Reply #5
That grooveshark doesn't work here, it redirects to http://www.mynextmusic.it/, a page from the Apache software foundation

Ys
Rozzo



Spotify plugin?

Reply #6
Really weird, don't know why. Everything works fine for me.

Anyway, there's unofficial stand-alone program for listening music from grooveshark with last.fm support, and it's open source. If i was the developer, i would try to make component for foobar.

But i'm not, pitty. :/
Disregard the constabulary.


Spotify plugin?

Reply #8
I'm completely in love with Spotify. Since it was released in Denmark, I haven't used foobar ever since - which I miss. I would love to see the combination of the customizable foobar with online music streaming. One of the really annoying things with Spotify, is it's gaps between songs.

Bring this to foobar, and you'll bring me back as well
Can't wait for a HD-AAC encoder :P

Spotify plugin?

Reply #9
Not going to happen.
libspotify's DRM, Themida, interferes with error reporting, debugging, etc.

And even though its possible to strip Themida by unpacking it, that would make the said component highly illegal.

Spotify plugin?

Reply #10
Sure it could happen. All you have to do is move the libspotify crap into a separate process and feed all the commands and data back and forth using pipes. Bam, crisis averted.

Spotify plugin?

Reply #11
I've done the bulk of the work for this in http://git.goeswhere.com/foo_input_spotify.git / https://github.com/FauxFaux/foo_input_spotify .

There's a pre-pre-pre-alpha release at https://b.goeswhere.com/foo_input_spotify-v003.7z .

It works fine except for when it crashes to desktop for no reason, or corrupts the heap, or etc.  I believe that the majority of this failure is inside libspotify and not my code.  Feel free to prove me wrong.  Also, if you've ever used a debugger or something horribly nefarious like PROCMON, having the plugin installed will cause Foobar to fail to start.  Basically, don't install it, libspotify will consume your face.

https://b.goeswhere.com/foo_input_spotify-v004.zip contains album art support, too (and is much more convenient to install in foobar), but /always continually crashes/.  I'm much more sure that these crashes aren't my fault.

Basically, I've entirely lost interest in this project; anyone is free to pick it up.

Signatures in tags: http://git.goeswhere.com/foo_input_spotify.../refs/tags/v003 http://git.goeswhere.com/foo_input_spotify.../refs/tags/v004
Code: [Select]
pub   4096R/779BA9B2 2011-10-12 [expires: 2021-10-10]
      Key fingerprint = 408A E4F1 4EA7 33EF 1265  82C1 B195 E1C4 779B A9B2
pub   1024D/A482EE24 2004-08-27 [expires: 2012-07-08]
      Key fingerprint = 34F5 5032 D173 76AA 0412  6117 7835 5BD4 A482 EE24

Spotify plugin?

Reply #12
Long story short, their Spotify library is broken in many fine ways that makes it unsuitable for foobar2000 consumption.
The major showstopper is that their OMGHAX protection, Themida, breaks horribly when loaded into any remotely non-trivial application. There's open bugs against them for breaking anything from foobar2000 to Python CTypes.

Even if the library loaded properly and didn't interfere with crash reporting and so on, you still have the problem with getting it multi-instance safe. It's written around retrieving and decoding a single track at a time. This is rather inadequate for a foobar2000 input component as it's very common that multiple tracks (or heck, a single track in multiple places) with the same flavor of input are used at the same time. An example of this would be my waveform seekbar scanning the waveform of playing and next tracks, or the replaygain scanner.

The only remotely feasible way of getting Spotify support into foobar2000 in my opinion is to evaluate and improve on the free libraries like libdespotify, as that at least doesn't have the OMGHAX "protection" and seems slightly competent. The concurrent decoding restriction might be a property of the Spotify delivery method in general, so that might be something one has to live with.
Stay sane, exile.

Spotify plugin?

Reply #13
Everyone so quick to post their rants that they missed my post entirely.

Spotify plugin?

Reply #14
A separate process would not help against the single-stream problem.
If you spin off a single separate process, it would only be able to service a single stream.
If you spin off multiple separate processes, you must have separate caches for each process as per the documentation.
Stay sane, exile.

Spotify plugin?

Reply #15
True, but it does fix the problem of debugging foobar itself, and preventing it from crashing.

Spotify plugin?

Reply #16
True, but it does fix the problem of debugging foobar itself, and preventing it from crashing.


Thou must not crash, or thy children (hellspawn) shall be bronies (furfags).
Am I allowed to say 'furfags' on here?
Only time will tell.

Spotify plugin?

Reply #17
I just registered to say that said plugin (even if it is only available for premium users) would be something really sweet. I am currently using spotify for streaming and foobar for local. I wish i could merge them both in foobar.
I do not program but I could donate for developers.

Thanks in advance,
MySeLf

Spotify plugin?

Reply #18
And did you read? Not going to happen.

Spotify plugin?

Reply #19
Has the situation changed over the last year? A plugin for our beloved foobar would be magnificient.

Spotify plugin?

Reply #20
Too late for an edit...

I played around and after some googling and some unsuccessful attempts I arrived at a working workaround: The program Jamcast redirects all audio to a DLNA renderer (WD TV Live in my case). Now I am able to listen to spotify on my HiFi -- without foobar, though I thought it is good manners to report my findings.