Skip to content

A music player for YouTube videos containing multiple songs. Originally built for daily/weekly quarantine live shows.

License

Notifications You must be signed in to change notification settings

lukekarrys/livefromquarantine.club

Repository files navigation

livefromquarantine.club

Preloaded Playlist Links

Links

Preloaded Playlists

Preloaded playlists are fetched and saved to this repo. This can also be triggered via a respository_dispatch action. A quick script to do this is run via npm run trigger. They are also pushed to the database on each push to the main branch. The data is stored in the repo to make deploys faster and less likely to fall since the YouTube API has some transient errors sometimes.

Adding a Preloaded Playlist

  1. Add a file to server/functions/videos/ARTIST_ID.js with the values from the types files
  2. Create an empty file at server/data/ARTIST_ID.json
  3. Add an entry to client/artists.json with a matching id and the name which will populate the button on the index page
  4. Run npm run data ID to save the data to server/data/ARTIST_ID.json
  5. Run npm run data:fixtures ID to see a visually easier to parse representation of what is parsed from that artist's data

Building the site

This will build a production version of the site. Any data previously preloaded via npm run data will be parsed into the correct API format and moved to the build directory.

NODE_ENV=production npm run build

Dev

This will spin up a dev server for the API and run the client locally. The dev server will use the preloaded data for the available playlists and load the rest directly from YouTube. The responses from YouTube will be cached while the dev server is running to cut down on YouTube API requests.

npm run dev

About

A music player for YouTube videos containing multiple songs. Originally built for daily/weekly quarantine live shows.

Resources

License

Stars

Watchers

Forks

Packages

No packages published