Skip to content

lazarvlade/spotifydiscover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spotify Discover

Ever get frustrated with your Discover Weekly playlist? This app creates a custom playlist with better recommendations based on your existing playlists and taste.

What it does

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.

Setup

Prerequisites

  • Node.js installed
  • A Spotify account
  • Spotify Developer account (to get API credentials)

Getting Spotify API credentials

  1. Go to Spotify Developer Dashboard
  2. Create a new app
  3. Copy your Client ID and Client Secret
  4. Add http://localhost:8888/callback to your app's redirect URIs

Installation

  1. Clone this repo
  2. Run npm install to install dependencies
  3. Open app.js and replace:
    • CLIENT_ID with your Spotify Client ID
    • CLIENT_SECRET with your Spotify Client Secret
  4. Run node app.js
  5. Open http://localhost:8888 in your browser
  6. Click "Log in with Spotify" and authorize the app

How it works

The app uses Spotify's OAuth flow to get access to your account, then:

  1. Fetches your playlists
  2. Gets tracks from your first 2 playlists
  3. Uses each track as a "seed" to get 3 similar song recommendations
  4. Creates a new playlist and adds all the recommended songs

Dependencies

  • express - web server
  • request - HTTP requests
  • cors - cross-origin requests
  • cookie-parser - cookie handling
  • querystring - URL parameter parsing

Notes

  • 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)

License

GPL-3.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published