Tidal Shuffle
A tiny script to do what billion dollars companies won't.
I know I just had a post, but this is too exciting to keep waiting. It might seem boring to some of you, but this is life-changing for me, and it might be for millions of other people, too.
If you have ever used Spotify, Prime Music, Tidal, or probably any other streaming music service, you probably noticed that their shuffle feature sucks. And to be clear, I don't mean it sucks because creating a shuffle feature is hard and they haven't been able to quite figure it out yet. I mean it sucks because these multi-billion dollar companies refuse to give even their paying subscribers a simple feature that has been included in every single media player I've used in over twenty-five years. It's pathetic and distasteful, and it makes me irate, obviously.

Let me briefly clarify what I mean when I say shuffle, because there are "versions." But the simplest version is this: shuffle means random. Every time a new track plays, every track in the list has an equal chance of being chosen. It's that simple. And we've had this capability since some of the earliest media players (pre-2000). Heck, even CD players had this!
What we also realized since those early days is that true random shuffle can be kind of annoying, because we might still end up hearing track A five times before track C ever gets played once. That's just how random chance works. So, we fixed it with a simple upgrade: shuffle without repeat.
Shuffle without repeat is exactly what it sounds like. It takes a list of songs and plays it in random order without repeating any songs until it has played all the songs. That's it.
But services like Spotify, Prime Music, Tidal, and others stubbornly refuse to implement these features despite wide-spread user requests for years. Why? Because their stockholders can gain another 0.01% by using the cache on your device instead of serving you a randomly selected track.
Today, I fixed it.
I'll skip the long story about how I switched from Spotify to Tidal thinking it would solve the problem only to realize Tidal has the same problem.
With Claude AI's help, I created a Python script that solves this problem (at least as gracefully as it can be solved by anyone other than the companies themselves). The script simply reads your Tidal playlist, makes a non-repeating shuffled version, and then creates a new Tidal playlist of your newly shuffled list. There's even another version of the script that makes sure the same artist doesn't get played within n number of tracks of itself.
It works incredibly well. It takes about 3 seconds to run the script, and voila, you have a new, perfectly shuffled playlist. And it's very safe. Your original playlist doesn't even get touched.
Instead of going through all the installation instructions and everything here, it's all in the README file on Github. If this looks intimidating to you, don't panic. If you carefully read that README file and follow those instructions, trust me, you can get this working. It's really not as scary as it might look. And if you want help, let me know! You'll be glad you did when you're listening to your perfectly shuffled playlist.



Comments