iTunes to Spotify Playlist Converter
For years, Spotify had a way to import playlists from iTunes into Spotify. Now, there are a variety of websites that claim to do it, but either can't accept large .xml files, or crash constantly. So I decided to write up my own. It just takes in the iTunes Media Library.xml file, extracts the playlists, and lets you choose which one you want to download. From there, it searches using the public Spotify API for the song name and artist, and combines them all into a long list of track IDs, that can be easily copy and pasted into Spotify.
This project took about two days to do, which was a LOT longer than I was expecting. I actually went through coding it in Xcode first, but got to the point where I had to make a UI in macOS, which I've never done, and got absolutely exasperated by the fun that is collection views. Instead of doing that, it actually turned out to be quicker to reimplement all of the logic in JS, and just put it all into an Electron app. This also had the benefit of working on other surfaces, instead of just on Macs.
You can just drag your XML file on, and it will parse it all.
You can scroll through all of your playlists, and click on the ones that you want to download.
For each track, it will ping the Spotify API to try and find it. If it's successful, it will mark the track as green, or red if it failed. It will then display a modal with all of the found Spotify Track IDs, which can be easily added to a Spotify playlist. It caches all of the URIs, so if you click away, downloading a playlist you already downloaded is instant. Additionally, if there are tracks that exist in multiple playlists, this speedup will help there as well. Overall, it was a fun distraction for a few days, despite the fact that my initial tool where it had no UI worked for me, and I will almost definitely not use this application again. Now it's out there!
You can download it from my Github, which also has the source code if you want to check that out. It also has some more concrete instructions. The link to the repo is here.