A Spotify playlist generator for music festival lineups. Choose from different filters and playlist options to customize it to your tastes. See the FAQ for more information.
./start_lineup_list.sh
/ ./start_lineup_list.bat
https://localhost
in your browser, or http://localhost:8080
if the LINEUPLIST_FORCE_HTTP env var is set to truelocalhost/health
for healthcheckTo run the server locally with full functionality, there are 5 environment variables you'll need.
Client ID
available underneath the app name and description, use this as the value of the CLIENT_ID env var Edit Settings
and add the following to the Redirect URI section: https://localhost/spotify-auth-callback
Show client secret
DEV
I like to add all of these to an .sh script that I can source before starting the server.
For example: source setup_env.sh
where setup_env.sh looks like:
#!/bin/bash
# Must `source ./setup_env.sh`, running it normally execs in a new shell
echo -n "Setting spotify client ID... "
export CLIENT_ID=client-id-no-quotes
echo "done."
echo -n "Setting spotify client secret... "
export CLIENT_SECRET=client-secret-no-quotes
echo "done."
echo -n "Setting deploy stage (DEV)... "
export DEPLOY_STAGE=DEV
echo "done."
echo -n "Setting setlist.fm API key..."
export SETLIST_FM_API_KEY=setlist-fm-key-no-quotes
echo "done."
echo -n "Setting FORCE_HTTP to false to use self-signed local certs..."
export LINEUPLIST_FORCE_HTTP=true-or-false-no-quotes
echo "done."
For Windows, assuming using cmd.exe remove the -n
and double quotes from the echo
lines, and replace export
with set
.
brew install redis npm
redis-server
in separate tabnpm i
npm run build
node dist/warm-cache-for-festival.js
npm start
https://localhost
in your browser (or http://localhost:8080
if LINEUPLIST_FORCE_HTTP is set to true)redis-server
in separate tabnpm i
npm run build
node dist/warm-cache-for-festival.js
npm start
https://localhost
in your browser (or http://localhost:8080
if LINEUPLIST_FORCE_HTTP is set to true)Two file formats are supported - text and YAML. Both are described below. The YAML format is more complex, but offers additonal functionality over the text format.
IF both a text and YAML file are present for a festival/year combo, the YAML file will take priority and the text file will be ignored.
If the festival has daily lineups released:
If the festival only has the full lineup released with no day lineups:
For convenience, a sample YAML file is shown below. The YAML file format supports some additional features over the text file format, though most are not yet implemented. As of August 2022 the only utilised feature is the ability to specify a Spotify Artist URI, to allow the loader script to lookup the exact artist rather than search by name. The festival fields do not overwrite the values currently hardcoded in the application, but are required and may support dynamic loading of festivals in future.
display_name: All Points East
slug: allpointseast
region: eu
year: 2022
days:
- number: 1
date: 19-Aug-22
display_name: Weekend 1
artists:
- name: The Chemical Brothers
spotify_uri: 1GhPHrq36VKCY3ucVaZCfo
- name: The Strokes
- number: 2
...
The above example shows a festival with multiple days. If the festival only has the full lineup released with no day lineups, simply add all artists under a single day with number: 0
.
YAML files are validated against a schema at load, defined in lineup-schema.json
. Any error will cause the load process to exit.
Note that is an artist name (or any other string) contains a colon (:), the value will needed to be enclosed in double-quotes to avoid breaking the YAML format.
[simplename]_[year].txt
or [simplename]_[year].yaml
in the lineups/ folder. Note that extensions are case-sensitive on some OSes.npm run build
node dist/warm-cache-for-festival.js [simplename] [year]
The following steps are optional but encouraged if you're set up to run the code locally yourself. It saves me time and will get your PR merged and deployed much faster if you can provide evidence of the below steps.
X == Y
in each line that prints Received X artists from Y lineup artist
.
If it does not, edit the artist names right above it that are printed in the
No artist found for search term <lineup artist>
. Common fixes here are splitting two DJ artists that are on one line going B2B, removingLive
or(Live)
from the end of artists, or sometimes just removing an artist entirely if you manually search them on Spotify and they don't appear.
There's one edge case to this - when getting newest songs from an artists albums, if the artist only has albums labelled as 'compilation's we don't persist the list of new tracks successfully. So you might see one or two artists on the re-run that have to retrieve newest songs again - there should be maximum 2, MAYBE 3 of these in a lineup. Often it's zero.
For example:
If you're adding a festival with a long name or name with spaces like Electric Zoo, your text file would be electriczoo_2021.txt
. It may not have an underscore anywhere besides between name and year. For abbreviate-able festivals you can also use their shortened terms: ezoo_2021.txt
. That would be filename and the name of the festival within the code. The option for a display_name
in the code is where you put the pretty version, Electric Zoo
.
If you're running the code locally and want to test and verify once the artists and option day info is in the text file and you've added the proper support in the code, you would run npm run build
, then node dist/warm-cache-for-festival.js ezoo 2021
. Monitor this output for any errors, but often you can let it run in the background and take a scroll back when it's finished. It takes anywhere from 1 to 15 minutes depending on number of artists on the lineup and how many have been previously saved to your local redis cache from other lineups.
Create a PR with your changes and include any testing you've performed.
Perform these steps if you've added a lineup and want to verify that all artists and data is retrieved properly. Assumes you've followed every step in the 'Adding a new festival' section above and have your environment set up to run the code locally.
npm run dev
to run Lineup List locally, then navigate to the proper localhost URL in the browser depending on if you're running HTTP-only or normallyAdding a new festival
sectionredis-server
if not already runningredis-cli get "festival:[simplename]_[year]:days"
and verify that the output is a stringified list of a single 0
valueredis-cli del "festival:[simplename]_[year]:days"
redis-cli --scan --patern "festival:[simplename]_[year]:*"
and verify that the output is a single item ending in :0
redis-cli del "festival:[simplename]_[year]:0"
node dist/warm-cache-for-festival.js [simplename] [year]
to populate days metadata
Note: If you're getting a ton of 400s and failures running warm-cache-for-festival.js, make sure you have the spotify token set as an env variable correctly
More and more festivals are doing large shuffles of artists after their lineup is released but before the festival. If a lineup on the site is out of date, these are the only steps needed to update it.
node dist/warm-cache-for-festival.js [simplename] [year]
to overwite metadata and fetch info for new artists