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-enrichfor BPM and key.
What It Does
For each track, the plugin:
- Opens a headless browser and navigates to open.spotify.com.
- 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.
- Searches for the track by artist and title.
- Navigates to the track’s Spotify page and reads the displayed play count.
- Stores the count as a custom
playcountfield, visible as the Plays column in the track table. - 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
| Setting | Type | Description |
|---|---|---|
| string | The 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:
| Column | Description | Example value |
|---|---|---|
| Plays | Total global stream count as shown on open.spotify.com | 248,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
| Status | Meaning |
|---|---|
| done | Track found and play count recorded |
| not_found | No matching Spotify track found |
| no_data | Track page found but play count was not readable |
| error | Browser 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-enrich | spotify-import | |
|---|---|---|
| Purpose | Capture play count for existing library tracks | Add tracks from your Spotify library to Kombiner |
| When to run | After your library is populated | During initial setup / ongoing sync |
| Adds new tracks? | No | Yes |
| Writes BPM/Key? | No | No (Beatport Enrich does this) |
| Writes play count? | Yes | No |
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.