lpinca / binb

:notes: Competitive, multiplayer, realtime, guess the song game
https://binb.co
MIT License
291 stars 61 forks source link

Way to Use Playlist Instead of Artist List? #31

Closed Brandon4466 closed 5 years ago

Brandon4466 commented 6 years ago

Is there a way to use a playlist ID from the iTunes API instead of several artist ID's?

This would make it a lot easier to add songs to the game and be more specific with the songs that we want in there instead of just having it randomly do artist's songs.

Any help with implementing this would be much appreciated!

Thank you!

lpinca commented 6 years ago

It should be possible but you have to write your own script to do that. For example https://itunes.apple.com/lookup?id=303171368 returns a specific track by its id. The tool included in this repo was only added to show how songs are saved in the database. How to pick songs it's completely up to you.

The example script is not very hard to understand, the important part is this https://github.com/lpinca/binb/blob/e2c700da189b64fa4b8728ae8ae3e816a1904a42/util/load_sample_tracks.js#L61-L73 For simplicity assume that only the 'mixed' room exists and it should be straightforward.