Visualize the current playing Spotify track with the album art using the web API.
This is a fork of the unmaintained spotispy repository. This fork changes the following:
- Use the spotify web API through spotify-web-api-node instead of scraping Spotify (which might get your account banned and is more unstable)
- Smooth progress bar at the bottom
- Various design tweaks
- Album name is no longer displayed because it's often included on the cover art anyways
- You now have to generate the oauth refresh token on your own (see below), which makes the code easier to maintain
- Clone the repo with
git clone https://github.com/l3d00m/spotify-visualizer.git
- Install dependencies with
npm install
- Create a file called
.env
in the project root with the secrets (see below) - Run with
npm start
- Optional: Download the Montserrat font from here and put it in the lib directory.
CLIENT_ID=example-client-id
CLIENT_SECRET=example-client-secret
REFRESH_TOKEN=example-refresh-token
- Create a spotify app here
- Replace
example-client-id
with the client id andexample-client-secret
with the client secret. - Open this handy tool: https://grant.outofindex.com/spotify for generating the needed refresh token with the following steps
- Paste your above client id and secret into the
app
section on the site - Under
scope
adduser-read-currently-playing
anduser-read-playback-state
- Now replace
example-refresh-token
in the .env file with the generated refresh-token and you're done
Alternatively you can use the Spotify API directly as described in their api docs, but this is needlessly complicated.
You can switch between your displays with Ctrl+Shift+Right
.