Skip to content

Automatically transfer Spotify tracks from one playlist to another on an interval, including your liked tracks

License

Notifications You must be signed in to change notification settings

zaknesler/modulate

Repository files navigation

modulate

latest release build status

I like keeping my favorite Spotify tracks in playlists labeled by year (e.g. a playlist called "2023") but it's annoying to add tracks to playlists manually.

This tool allows you to transfer the tracks from one playlist to another on an interval. Most importantly, this also includes moving tracks from your liked/saved playlist, so you can press ❤️ and go on with your obviously busy life.

Once you connect your Spotify account and configure a watcher, it'll stay running and auto-transfer your tracks on the interval you choose (e.g. every hour/week/day). You can also configure it to just copy tracks instead of removing them. For example, you can keep your saved tracks synced to a collaborative playlist with your friends, or vice-versa.

View screenshot screenshot of app after configuring watchers

Usage

If you'd like to run it for yourself:

  1. Create a Spotify developer application
  2. Clone this repo
  3. cp .env.example .env
  4. Add Spotify creds to .env
  5. touch .data/modulate.db
  6. cargo run
  7. Go to localhost:4000, sign in, and configure

You are free to connect as many users as you want, as long as you add their email to your developer application via the dashboard.

Thanks

A few honorable mentions:

  • axum — to provide a web interface
  • oauth2 — for authenticating with Spotify API
  • askama — for HTML templating
  • rusqlite — for easily storing tokens and watchers
  • r2d2 — for managing the db connection