Ever get frustrated with your Discover Weekly playlist? This app creates a custom playlist with better recommendations based on your existing playlists and taste.
This Node.js app connects to your Spotify account and:
- Looks at your first 2 playlists
- Takes the first 5 tracks from each playlist
- Gets 3 new song recommendations for each track using Spotify's API
- Creates a new private playlist called "Recomandari" with all the recommended songs
Basically, it gives you a fresh playlist of songs you'll probably like, since it's based on music you already listen to.
- Node.js installed
- A Spotify account
- Spotify Developer account (to get API credentials)
- Go to Spotify Developer Dashboard
- Create a new app
- Copy your Client ID and Client Secret
- Add
http://localhost:8888/callbackto your app's redirect URIs
- Clone this repo
- Run
npm installto install dependencies - Open
app.jsand replace:CLIENT_IDwith your Spotify Client IDCLIENT_SECRETwith your Spotify Client Secret
- Run
node app.js - Open
http://localhost:8888in your browser - Click "Log in with Spotify" and authorize the app
The app uses Spotify's OAuth flow to get access to your account, then:
- Fetches your playlists
- Gets tracks from your first 2 playlists
- Uses each track as a "seed" to get 3 similar song recommendations
- Creates a new playlist and adds all the recommended songs
- express - web server
- request - HTTP requests
- cors - cross-origin requests
- cookie-parser - cookie handling
- querystring - URL parameter parsing
- The app creates a private playlist so only you can see it
- It only looks at your first 2 playlists to keep things simple
- Each track gets 3 recommendations, so you'll end up with 30 new songs total
- The playlist description is in Romanian (because that's where I'm from)
GPL-3.0