TrackMatch is a Web App that allows you to quickly create playlists for Spotify and Apple Music by entering a list of songs or albums or through converting playlists between the two services.
npm install netlify-cli -g
netlify dev
If you have a text list of albums or songs copied from somewhere, enter them in the textbox, click search and start selecting. To find full albums, toggle the album switch and start selecting. When creating a playlist, the tracks of the albums will be inserted in the order of the lines of input.[^1]
If youre logged in to both Spotify and Apple Music, a tab named Convert will appear next to the Textbox tab. This allows you to select a playlist from each other service. The search will take the particular recording (see ISRC) into account.
While in Convert mode, the Autoselect toggle reorders the items in each shelf according to the search string it parsed from the item in the playlist and selects the first one. This is useful in those instances where the top result will be a compilation album instead of the original release. In the sidebar, stats are displayed keeping you up to date about the number of selections you made and the number of results found.
If no results show up, you can reload a shelf by editing the Results for field and clicking reload.
If that still doesn't help, you can always switch the country - if just out of curiosity.
For the songs that have not been found (or where you chose to select none of the results), theres an option called Missing Tracks Playlist. If activated, a playlist with the name ${NewPlaylistName} Missing Tracks
will be created in the source service, keeping track of your progress.
Export the list as a CSV, including the search term and, if selected, the ID of the tracks.
I was faced with the task of quickly converting my Apple Music collection to Spotify. Since I was making extensive use of the iCloud Music Library, this was easier said than done, as there were loads of tracks that lacked the metadata necessary to make conversion easy.
Though Apple Music is capable of matching a song in your local library to one in their catalog, the matching process relies solely on the music file itself, meaning it only cares about the recording, which is in turn associated with an ISRC code. This is problematic because the release itself might differ (think compilation albums, soundtracks, etc.).
To be exact, the following metadata is available over their API for uploaded or matched songs in your library:
This is substantially less than what is available via a query to one of the songs in their catalog, which includes things like comments, composer name, release year, etc. The full list of attributes can be found here.
(Interestingly, if you delete a fully tagged song in your library, just to re-download it seconds later, the downloaded file does contain some of the original metadata, albeit not completely. This data does not seem to be available via an API, though.)
As you can see, your own tags aren't available via the API. All that is possible is to query the associated catalog number.
While they do a good job at disguising the problem by uploading your own album art (as well as the most basic metadata contained in your file, such as artist, title, album name, etc.), the problem can be exposed even simpler by creating a sharable link to a playlist with the "Matched" tracks opening it in an incognito window. A high percentage of those will reveal that the linked track has a different catalog track, most obviously by showing a very different album cover. This could be expected, but would not be necessary if they took the additional data contained in the files into account during the matching process.
Obviously, for listening purposes, having a different release is fine. For curating a collection, though, it's disastrous. It leaves us with problem of having a different song release in your library. I thus decided to return back to using Spotify as my streaming service, since the added value of having your library everywhere was quite diminished at this point. It stops being your library. That said, I'll still be using Apple's Music.app for managing my local collection.
Now I was left with a problem: I still wanted be able to share my playlists, but with the correct metadata. In other words, I wanted to get my local collection into Spotify, with the playlists I made on Apple Music.
To solve this conundrum, I could have taken the route of either utilizing the ITLibraryFramework integrated into MacOS and fetch the data of the local tracks from there, or go with any old tagging software and export a file with the track information. However, I quickly had to scrape this idea since I never tagged most of my files with the correct ISRC. I would have liked to use MusicBrainz Picard for this job, but turned out that its database often misses said identifier.
But then I figured that during the matching process, the correct ISRC is assigned to each track, available over their API. This doesn't apply to uploaded tracks of course, but since Apple's algorithm is quite good, those song amount to only a relatively small part of my collection.[^2] Besides, I had to find a way to oversee the conversion process anyway, due to the problem of finding the correct release.
Since I had already been familiar with a web app called Spotlistr, its textbox search immediately came to my mind and I wanted to built something similar with added capabilities that I missed when using it.
And so, I decided to went for two modes: A Conversion mode, which searches Spotify by ISRC of the associated track available on Apple Music and then reorders the results based on the similarity to the edited metadata provided by Apple Music, and a textbox mode, which doesn't promise to find only the same recordings, but you'd have to figure them out anyway (if you lacked the foresight of tagging either ISRC or UPC codes, like myself).
Furthermore, I wanted to be able to refine a search without having to reload the entire list and to have the ISRC of each song displayed next to it, to make sure its the recording in question and to see whether there were actual different recordings listed. A preview button would also help.
The last pickle I had with Spotlistr was its tendency to crash when creating the final playlist, which could get very frustrating. Thus, I wanted any list including the selections made to be saved whenever the user quit.
Since I worked extensively with both APIs in this project, Ill let you in to some pros and cos of each. Right off the bat, the biggest pro for Spotify's API is that it's free. Meanwhile, using the AM API requires you to take part in the Apple Developer Program, setting you back 100$ per year.
https://spclient.wg.spotify.com/track-credits-view/v0/experimental/${track_id}/credits
Distributed under the MIT License. See LICENSE.txt
for more information.
[^1]: Users of Apple Music should take notice that if you already have the item in your iCloud music library (with a status of matched), creating a playlist with the track will not honor your choice of release, i.e., Apple Music will identify the track as a duplicate and merge it with the one in your library. [^2]: In many cases, song get uploaded when the equivalent song on Apple Music is an iTunes Digital Master, which will differ from the audio file of other streaming services.