The song A Horse with No Name is listed as A Horse with No Name - 2006 Remastered Version on Spotify but Apple Music doesn’t include that suffix even though they have the exact same version of the album. The final issue on the API side revolves around remastered tracks. To fix this issue, if no results are returned from the iTunes API then I then do a search for the title alone and return the first result as that works in 99% of cases. If you search term=solayoh+alyona+lanskaya then you get no results. The next issue I encountered involves the Romanization of Belarusian the track Solayoh is rightly attributed to Alyona Lanskaya on Spotify but Apple Music uses Romanization so it becomes Alena Lanskaya. To resolve this, we started sending the album information (in addition to title and artist name) so I could match that manually by iterating through the results I then only choose the first result if there isn’t a song in the list with the same title and album name. For example, consider the song She Looks So Perfect by “5 Seconds of Summer” If you search for this, the first result on the iTunes API will actually be a the “Ash Demo Vocal” version of the song which is not the one we want. artist=rick+astley title=never+gonna+give+you+up) so everything has to be concatenated together which leads to an issue sometimes the song you expect is not the one you get. Unfortunately the iTunes API does not allow you to search multiple terms (i.e. This is fairly straightforward and a first draft would send a request like this: The next step is for the server to take the information that has been sent and use the iTunes Search API to try and find a match. In future, we may add more information (track number on the album, duration, etc) in order to try and match better but this is working well enough currently. If a change is detected, the title, artist name, and album name are all sent to my server so I can begin the process of matching the song on iTunes. With this, John was able to write an app that polls Spotify regularly 2 to see if the track has changed. I hadn’t heard of it before but Apple has provided a tool called Scripting Bridge since macOS 10.5 which allows you to interface with AppleScript from other programming languages such as Python and Ruby. I’ll run through each piece and go over the challenges that were encountered. I then use the iTunes Search API to look up the song and find the correct identifier which is then sent to an app on my iPhone via push notification to start the song playing on Apple Music. He has written an app that checks if the track has changed and, if it has, sends the track information to my server. The basic idea is that John acts as the host with the playlist on Spotify (on macOS) playing into his headphones. As we’re both developers, we decided to remedy this problem with a fairly convoluted solution… Now I could just recreate the playlist in Apple Music to solve the Spotify ads issue but we still wouldn’t be in sync. They aren’t in sync so we might be humming (or badly singing) along to a song that the other person isn’t listening to.As I use Apple Music now, I don’t pay for a Spotify premium account and so I have to put up with adverts (which are utterly terrible).On most Tuesday nights, my friend and podcast co-host John Wordsworth and I play a few rounds of Rocket League and we will regularly have the Definitive Hits on whilst we play. I maintained a playlist I affectionately called Ben Dodson’s Definitive Hits Collection which contained nearly 45 hours of songs I thought were particularly good 1. Before Apple Music launched in April 2015 I was a longtime Spotify user and subscriber.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |