Comments (7)
This could be a thing, though it currently isn't very high on my list and I'm already really busy.
Contributions welcome.
from archived-bot.
Been working on this and basically it's in a functioning state. There is a problem though, the only decent Java Spotify API I found is a bit dated, and one of the things it's missing is loading more than the first page of a playlist, so currently it works only for the first 100 tracks.
For me it would mean a non-trivial amount of work to go and fix this, because it sounds like lots of stuff I haven't done yet (inb4 I'm just panicking and actually fix it in a day's time lol).
I see several paths to fix this:
- Ditch that Spotify API and do our own few requests. For the Spotify playlist feature we need authorization + 2 kinds of requests, that's not too complicated.
- Keep that Spotify API, somehow make the missing request from scratch in our own code
- Fork the Spotify API, add the missing request, and publish it
I think adding and keeping the Spotify API in FredBoat would be worth it, because chances are high (this is a MusicBot, after all) we might want to do even more requests to Spotify in the future.
I feel like going with option two, and then later, if I can be assed, to do it the correct way which is option 3.
I'm planning to polish what I currently have (= only add first 100 tracks of Spotify playlists), and then go do the fix for that underlying issue.
Feel free to chip in thoughts on what to do, and whether FredBoat would want to roll out limited Spotify playlist support first and then upgrade later, or do the full thing later.
from archived-bot.
Either path works for me. I would imagine that it would be pretty simple to just fetch the full list with just a loop of REST requests in the source manager.
API documentaion:
https://developer.spotify.com/web-api/get-playlists-tracks/
from archived-bot.
In case you were wondering how I solved the aforementioned thing: After going on a small odyssey including using java reflection to access private methods and other nonsense I settled with the 4th option of utilizing my brain correctly and using that Spotify API properly (turned out I just needed to add parameters to its requests).
from archived-bot.
just to add to this. its also possible to request single tracks and albums. ive done it discord python bot so i could see if i can work it out for java (nvm looks very different from how i added the support for it in python)
from archived-bot.
Indeed. Could be a convenient way to access information on artists/albums/other stuff to create playlists which are then loaded over music providers.
https://developer.spotify.com/web-api/search-item/
from archived-bot.
This is now available on the development
branch for selfhosted bots and the patron bot. Thanks napstr!
from archived-bot.
Related Issues (20)
- Bot got stuck in connecting to VC after discord server crash HOT 5
- Bot doesn't leave when left alone HOT 4
- Bot not responding while doing searching tracks from Spotify in YouTube
- DanceCommand is broken
- FredBoat Music Failures HOT 1
- Prioritized tracks remain prioritized with the 'all' repeat mode HOT 6
- Compatibility issue with Clyp.it HOT 1
- Youtube error with Twitch streams HOT 1
- Feature: Gracefully handling Lavalink restarts HOT 1
- Edit the message sent when ;;help is executed HOT 3
- Feature: Add build instructions to CONTRIBUTING.md HOT 4
- [Feature Request] playfirst command HOT 1
- Use more updated version of gradle
- Add youtube title to ;;export output. HOT 1
- Configuration option to restrict DJs from skipping Admin's songs.
- SELFHOSTED - stop command makes the bot leave the channel HOT 3
- Youtube search is broken
- Feature request: Allow FredBoat to DM me track announcements HOT 1
- [Feature Request] Play direct links to mp3, wav, or other music files HOT 2
- SayCommand is not secure HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from archived-bot.