Need to reorder tracks in your Spotify playlists? This little web app I coded will do it for you!

11/07/2019

No matter if you are a playlist curator or you're just mad at Spotify for their wonky shuffle function, this little web app has the power to save your day as it makes shuffling the contents of your Spotify playlists easier than ever! And even though there are some similar apps available, this one has one unique advantage - it doesn't need to create a new playlist, it shuffles the tracks in place instead, keeping their original playlist-related metadata.

Being playlist curator myself, I am often facing the need for reordering tracks in my playlists. It usually happens after I go through the new batch of submissions and add a lot of new beats - shuffling the playlist content in such cases seems like a good idea to me, as the music of the newly added artists won't stay sitting at the very bottom of the playlist, where it got automatically placed when I added it.

Doing that manually every time for hundreds of beats spanning across almost dozen of playlists I curate at the moment just seemed like a bit of an overkill, so I went looking for some handy little web app working with Spotify Web API, which would do that for me. And I was lucky to find a few, but as I sadly realized after trying them all, not a single one seemed to work in a way I needed. All of them were creating a new, empty playlist, and then populating it with randomly sorted tracks from the original one. I, on the other side, needed this to happen inside the original playlist, without deleting and adding the tunes at all, but rather just changing their order.

UPDATE: As Murphy's laws are undeniable, just a few hours after I finished this tool, I found two more that actually work in the same way, shuffling the playlist contents "in place". That effectively makes my app not as unique as I thought, but it still may come in quite handy :) 

Why? Well, because as I am adding new tunes into my playlists, I am also trying to get those playlists rid off the older tunes so they don't grow to insane numbers. But in order to clean them efficiently, I need to see when the tunes were originally added and be able to use this column for sorting those playlists. Sadly, the other "playlist shufflers" all lose this information during the reordering process, thus being unusable for my use-case.

And then there were also those countless posts in r/spotify subreddit with dozens, maybe hundreds of people voicing their discontent with the way the Spotify's own shuffle function works within its playlists, reportedly shuffling only a certain portion of tracks and never actually getting to the rest of the playlist. I didn't know how useful would it be to that bunch, but it seemed like a nice opportunity to kill two birds with one stone.

So once again, I had to get my hands dirty to make my life a bit easier and come up with a new solution overcoming above described fatal flaws. Luckily, something got stuck in my head from my last Spotify Web API projects, so it didn't hurt so much this time and I got the proof of concept working quite fast, while my girlfriend was trying to fall asleep in the dim light of my screens. A few days later I finally found a free day in my schedule I could spend entirely on this project, resulting in the very first final version of the app being finished and also successfully deployed on Heroku (so you can actually try it right now)!

The app's interface is everything but complicated. First, you're immediately taken through Spotify's login process and once you're authorized, the app presents you with its default screen. All you can do there is pasting the desired playlist's URI or URL into the input field and hitting the search button. It won't work for every playlist though - understandably it's limited to function only with playlists that you created. Trying to reach other user's playlist will result in an informative error bubble, not letting you proceed.

Once the desired playlist is found by the app, an overlay with the playlist info will appear, giving you the options to either shuffle the given playlist or close the overlay (which will take you back to the default screen). The shuffling itself is designed as a synchronous process though, so the time it takes will increase accordingly to the size of the playlist. With small playlists, it's done almost immediately, but large playlists containing over thousand of beats can take up quite some time - so be prepared for that (and maybe grab a cup of coffee :)) It's still way more convenient than doing it manually yourself, right?

However, I should warn you that there is one possible issue you might run into with larger playlists. Spotify is somehow limiting the number of requests the app can send to its API over a certain period of time, so it might happen that it will stop working for a short while if this limit gets reached. But I didn't run into this issue myself when testing the tool on my own playlists and I hope you won't run into it, too.

Anyway, that's pretty much everything the app can do for you right now (but to be honest, it's all I wanted). I have already some ideas on additional features and upgrades in my mind, but now it's too soon to start throwing them around. My main aim in the upcoming days is gonna be spreading the word about the app, getting some people to use it and fixing eventual bugs (and oh, there will be some, that's for sure). Time (and people maybe, too), will probably tell where I should be heading next with the development.

P.S.: If you find this cool little app useful, you can buy me a cup of coffee to support me with my projects... or follow me on Spotify - I bet you'll like some of my beats ^^


Loopcloud Music App from Loopmasters.com

First time on my blog?

Welcome! My name is Pao and I'm the person behind this whole website. Besides making music myself whenever I can, I also write this blog and curate Spotify playlists. Feel free to explore it here a bit - I believe you will find some interesting stuff around ^^