cronchords

Spotify and YouTube Music playlists, kept in sync.

One way or both ways, on your own accounts and API keys, for free.

The dashboard with example playlists. You pair two playlists once, and the worker syncs them every hour.

Why cronchords

Free
The sync runs on GitHub Actions, its state is stored in a free Supabase project, and the dashboard is a static site. There is nothing to pay for.
Your own keys
You create the Spotify app and the Google OAuth client yourself. Your tokens stay in your own Supabase project and your own GitHub Actions runs. There is no cronchords server in between.
Runs on its own
It syncs every hour, and no computer of yours has to be on. If you'd rather, run it on a Raspberry Pi, in Docker or as a systemd service.
Open source
The code is under the MIT license, so you can fork it, run it and change it.

How it works

You pair a Spotify playlist with a YouTube playlist and pick a direction. Every hour, the worker copies the changes to the other side.

  • Spotify to YouTube The worker copies new songs to YouTube and never removes anything.
  • Spotify from YouTube The worker copies new videos to Spotify and never removes anything.
  • Spotify and YouTube The worker copies additions and removals in both directions. If you replace a wrong match in the playlist, it remembers the right one.
Careful matching
Title, artist and length have to agree. Covers, live versions and remixes only match each other, and the worker prefers album uploads from Topic channels.
Searched once
The worker caches every match by ISRC, so it looks up each song once, however many playlists the song is on.

The shared list

YouTube allows about 100 searches a day, and most users search for the same songs. The matches their workers find go into youtube-spotify-mapper, an open list of Spotify tracks and their YouTube videos. Every worker checks the list before it searches.

Searching YouTube
100 units
of the 10,000 a day
A song from the list
1 unit
and it works after the day's searches run out
Licence of the list
CC0
use it for anything, extend it with a pull request

Reading the list and sharing your matches are both on by default. To turn either off, set USE_SHARED_MATCHES or SHARE_MATCHES to false.

Hard to troll

  • The list's update job checks every pair with the same rules the worker applies to search results.
  • A correction made by hand needs at least two accounts that agree.
  • Accounts younger than 90 days don't get a vote.
  • Every worker checks each match it takes from the list again.

Privacy

What is shared
Spotify track IDs, YouTube video IDs, ISRCs, and whether you corrected a match by hand. Your playlist names, and which songs are on which playlist, stay in your database.
What is public
The shared pairs are on a branch of your fork, so anyone can see which songs you sync.
Turning it off
Set the variable SHARE_MATCHES to false.
Taking it back
Delete the cronchords-export branch. The list drops your matches with its next update.

Limits

Read these before you fork.

Spotify
The app's owner needs Spotify Premium, and cronchords can only sync playlists you own or collaborate on.
YouTube
Adding a song to a YouTube playlist costs 50 of the 10,000 daily units, so about 100 new songs fit in a day. A big playlist takes a few days the first time.
Reconnecting
You have to reconnect Spotify every six months. The dashboard shows when.

Setup

Setup takes about 20 minutes. The setup guide in the README describes every step.

  1. Fork the repository
  2. Create a Supabase project and run the SQL migrations
  3. Deploy the dashboard on Vercel, Netlify or GitHub Pages
  4. Create a Spotify app and a Google OAuth client
  5. Connect your accounts and pair the playlists
  6. Turn on the hourly sync