Menu

Syncing Spotify Genre Playlists Into One Main Playlist
📰

Syncing Spotify Genre Playlists Into One Main Playlist

DEV Community: node·Danny Holloran·6 days ago
#t7nKBDjJ
#devtonodejs#devto#dev#playlist#genre
Long article (1235 words) — no AI summary yet.
Reading 0:00
15s threshold

I keep my music in genre playlists: shoegaze in one, dub in another, and so on. That works when I want one mood. It falls apart when I want everything I'm currently into, and it does nothing for Liked Songs, which I treat as an all-time archive.

What I wanted was simple to state. Add a track to any genre playlist, and it should also show up in a main playlist and in Liked Songs. Remove it from the genre playlist, and it should leave the main playlist but stay in Liked Songs forever. Spotify has no "this playlist is the union of those playlists" feature, and adding everything twice by hand drifts fast. So I wrote spotify-sync : about 500 lines of Node, zero dependencies, run by launchd every 15 minutes.

The main playlist is derived

The core idea is that I don't really own the main playlist's contents. Every run recomputes it as union(sources) , then diffs the current playlist against that and applies only the difference.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.