Spotify Enrich

The spotify-enrich plugin opens Spotify’s web player and records the play count for each track in your library. This gives you a concrete popularity signal — how many times a track has been streamed globally — surfaced as a Plays column directly in the track table.

Plugin version: 0.1.9 | Stage: Enrich | Requires browser: Yes

This plugin is for play count capture only. It does not enrich BPM, key, genre, or any other DJ-relevant metadata. Use beatport-enrich for BPM and key.


What It Does

For each track, the plugin:

  1. Opens a headless browser and navigates to open.spotify.com.
  2. Authenticates using a passwordless email login — you receive a 6-digit code via email, enter it once, and Spotify’s session cookie is stored for the rest of the run.
  3. Searches for the track by artist and title.
  4. Navigates to the track’s Spotify page and reads the displayed play count.
  5. Stores the count as a custom playcount field, visible as the Plays column in the track table.
  6. Also saves the track’s Spotify URL to its links map.

The browser session is kept alive across all tracks in the same run — you authenticate once at the start and the session is reused.


Configuration

SettingTypeDescription
emailstringThe email address associated with your Spotify account

No password is required. When the plugin runs for the first time (or when your session has expired), it will pause and call browser_prompt() to show you the browser, where you complete the email 6-digit code login. After that, the session is cached for future runs.

A free Spotify account works. Premium is not required.


What Gets Enriched

This plugin adds one custom column to the track table:

ColumnDescriptionExample value
PlaysTotal global stream count as shown on open.spotify.com248,000,000

Play count is a reliable proxy for a track’s commercial popularity. Sorting your library by Plays quickly surfaces the biggest records in a particular genre or time period — useful for setlist planning or for identifying tracks your audience is likely to recognize.

A Spotify link is also stored in the track’s links map for quick access to the track on Spotify.


Enrichment Statuses

StatusMeaning
doneTrack found and play count recorded
not_foundNo matching Spotify track found
no_dataTrack page found but play count was not readable
errorBrowser or network error

How Search and Matching Works

The plugin sends an artist title search query to Spotify’s web player and evaluates the top results. It uses execute_with_permutations to handle artist name variants (e.g. Artist & Artist 2 vs. Artist, Artist 2), which is important because Spotify and Beatport frequently use different styles for featuring credits.

If the first result does not look like a match, the plugin tries the next few results before giving up and recording not_found.


Spotify Enrich vs. Spotify Import

These two plugins serve very different purposes:

spotify-enrichspotify-import
PurposeCapture play count for existing library tracksAdd tracks from your Spotify library to Kombiner
When to runAfter your library is populatedDuring initial setup / ongoing sync
Adds new tracks?NoYes
Writes BPM/Key?NoNo (Beatport Enrich does this)
Writes play count?YesNo

Use spotify-import to build your library and spotify-enrich to layer in popularity data afterwards.


Tips

  • Sort by Plays to find crowd-pleasers. After enrichment, clicking the Plays column header ranks your entire library by global stream count — a fast way to identify peak-time vs. deep-cut tracks.
  • Play counts change over time. Re-running the enrich plugin on your library periodically keeps the numbers fresh. This can be configured in the plugin settings.
  • Use alongside Beatport Enrich. Combining Beatport Enrich (for BPM, key, genre) with Spotify Enrich (for play count) gives you a rich metadata picture without any manual data entry.
  • 6-digit code expires. If you haven’t run the plugin in a long time, your Spotify session may have expired. When this happens, the plugin calls browser_prompt() again for you to re-authenticate.