Skip to content
Article
· 5 min read

One queue for every music source

YouTube, Spotify, Apple Music, Deezer, SoundCloud and Tidal agree on almost nothing. What it takes to make them all behave like one queue.

Beatra plays from YouTube, Spotify, Apple Music, Deezer, SoundCloud, Tidal and direct audio links. From the outside that is one feature. Underneath, those sources agree on almost nothing.

What differs

  • Identifiers. Every service has its own, and none of them match another's.
  • Metadata. Title, artist and album come back in different shapes, with different conventions for features, remixes and remasters.
  • Availability. A track on one service may be missing, region-locked or a different edit on another.
  • Links. A shared URL might be a track, an album, an artist, a playlist or a radio seed, and telling those apart is per-service.

A canonical track in the middle

The queue never holds service-specific objects. Everything resolves first to a canonical track — a normalised title and artist, a duration, and whatever identifiers are known. The queue, the playlists, the history and the now-playing display all speak only that.

This is what makes mixing sources work at all. A queue can hold a Spotify link, a YouTube link and a direct file, and nothing downstream has to care, because by the time it arrives they are the same kind of thing.

Matching is the hard part

Deciding that a track from one service is the same track as one from another is genuinely difficult. Titles carry noise — "(Official Video)", "Remastered 2019", featured artists in three different positions — and durations differ by seconds between masters.

Normalising titles and comparing durations within a tolerance handles most of it. Where a service exposes a recording identifier, that is worth more than any amount of string comparison, and we prefer it whenever it exists.

Supporting six sources is not six integrations. It is one canonical model and six adapters that agree to speak it.
beatra
product