lavalink-devs / Lavalink

Standalone audio sending node based on Lavaplayer.
https://lavalink.dev/
MIT License
1.59k stars 672 forks source link

Spotfiy ?? #347

Closed Sekai966 closed 2 years ago

Sekai966 commented 4 years ago

can you add spotfiy ?

topi314 commented 4 years ago

No Spotify only supports playback for users & there is no way to scrap it

What you can do is using the Spotify API to get the track meta data like name & search that on yt

OtterBoops commented 4 years ago

The premium version of Fredboat supports Spotify. https://fredboat.com/docs/donate

DRSchlaubi commented 4 years ago

The freadboat doc actually says The ability to add Spotify playlists with tracks found on YouTube and Soundcloud So they query track data from spotify API and then search those data on Youtube or Soundcloud, which most bots do nowdays.

But lavalink could add such a feature to the search api

freyacodes commented 4 years ago

But lavalink could add such a feature to the search api

Meh.

I'm more inclined to add a plugin system. In which case you could just yank FredBoat's custom source provider into a plugin.

Milo123459 commented 3 years ago

In theory you could make a spotify account and just use something like puppeteer, selenium or something like that to just scrape it.

mouncg commented 3 years ago

In theory you could make a spotify account and just use something like puppeteer, selenium or something like that to just scrape it.

you would get ratelimited quite quickly

RinLovesYou commented 3 years ago

Spotify integration is quite hacky. In theory there are a few routes you can take

If your bot is only for your use, and you know it won't be used more than once at the same time, you could disguise it as a spotify enabled speaker (it'll act like google home) and with the help of a few libraries i was able to control my spotify client using a program. You could pipe that output to your discord bot in one way or another.

A friend of mine once wrote a lil local server in golang that could somehow host spotify songs on a local webpage that lavaplayer could then happily accept. I cannot tell you how to do this and i cannot recommend doing it as it technically violates TOS if you're using it on a large scale (sharing spotify accounts is technically not allowed) Though it does stand to reason that even this could cause rate limiting on a large enough scale.

I think you would have an easier time reading track metadata and looking it up on other services that lavaplayer does support.

devoxin commented 2 years ago

I don't think there'll ever be true Spotify integration due to the obstacles you'd need to overcome to be able play directly. That, and you would probably need a lot of premium accounts.

I will, however, be closing this with the release of the plugin API. Used in conjunction with Topi's Source Manager Plugin, you can achieve pretty effective Spotify support.