kauffecup / the-playlist

The Playlist

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Playlist(s)

The Playlist

The Singles Playlist

To Run

Set Up

Install Dependencies

npm install

Set Environment Variables

Create a .env file based off of .env.example. Set the following fields:

APP_CLIENT_ID=<Spotify Application ID>
APP_CLIENT_SECRET=<Spotify Application Secret>

APP_LOGIN_URI=<Login Uri (http://localhost:3000/login)>
APP_REDIRECT_URI=<Redirect Uri (http://localhost:3000/callback)>

CLIENT_USERNAME=<Your Spotify Login>
CLIENT_PASSWORD=<Your Spotify Password>

Run

npm run start

This runs node src/index.js which:

  1. Kicks off a server
  2. Spins up puppeteer to authenticate with Spotify's OAuth2
  3. Once it has the token ensures both Top 100 Albums and Top 100 Singles playlists exist for authenticated user
  4. Loads everything spotify tags as new
  5. Filters out albums and singles to those released from last last Saturday to last Friday
  6. Sorts albums and singles by popularity
  7. Replaces playlist tracks with tracks from newly filtered/sorted albums and singles

About

The Playlist


Languages

Language:JavaScript 100.0%