Music Service.

Sunday, July 18, 2021

Rob In der Maur

Building an app that helps you to create and manage charts for a variety of music collections is fun in itself. But only looking at these charts will not be enough for most users I quickly realised.

So, in building the app I was thinking of how to integrate Chart Your Music with some of the more popular music services out there.

Initially, I relied on the iTunes API. Being an Apple ecosystem based app, Chart Your Music uses this API to find music and allows you to preview (or should a say, pre-listen) a track.

Given the popularity of Spotify, and less so, Apple Music, and on top of that the possible desire to listen to full tracks/albums, I added integration to these music services in the app.

So how will this eventually work?

When you install the app, by default it will use the iTunes API integration. It doesn’t require authentication, it works out of the box. But you can only listen to previews of entries, not full tracks/albums.

In Settings, you can switch to your preferred music service, either Apple Music or Spotify. After such a switch, as soon as you do a search for an entry and hitting the specific music service, you will be prompted to authenticate against that service and/or approve that Chart Your Music is allowed to use your authentication details to access the service. You only have to do this once b.t.w..

And with that, each entry you add from searching in or sharing from the music service will have a reference to that music service. That reference allows you to play the entry (track/album) using the music service’s functionality (i.e. player).

And, on a chart level, allows you to even create a playlist (in reverse order) within that music service so it plays with your most favourite music at the end!

You can always update an entry’s reference in the music service using the Update function accessible through the Edit Entry sheet. This allows you to search once more the music service for the relevant entry and update the entry’s reference to the track/album.

In the current implementation, selecting your preferred music service is important and its decision should not be taken lightly. However, I do anticipate one does not change music service overnight anyway. When doing so, be aware you have to update your references manually. In an upcoming release I might consider automating that. As well as adding more music services (e.g. Tidal, Deezer, etc.).

Mastodon Mastodon