djay Integration
Algoriddim djay Pro stores its library in a SQLite database called
MediaLibrary.db. Now Playing’s djay-connect package polls this database to
detect track changes, supporting both the macOS and Windows versions of the app.
What It Reads
Section titled “What It Reads”MediaLibrary.db contains:
- A tracks table with per-track metadata.
- A playing state table that tracks which tracks are loaded on which decks and their current playback position.
- Streaming service metadata for tracks loaded from Spotify, Apple Music, Beatport, SoundCloud, or TIDAL.
Polling Behaviour
Section titled “Polling Behaviour”The database is watched using an mtime-based polling loop with a configurable
interval (default 2 seconds, minimum 2 seconds). When djay Pro writes to the
database, the file’s modification time advances and the connector re-reads the
playing state table.
Only the playing-state rows are checked per poll — the main tracks table is only read when a new track ID is encountered.
Decoding djay’s URL-Encoded File References
Section titled “Decoding djay’s URL-Encoded File References”djay stores file paths as URL-encoded URIs. The connector decodes these to native file paths so that the embedded artwork extractor can read the underlying audio files.
Decoding the TSAF Format
Section titled “Decoding the TSAF Format”Some fields in the djay database are stored in a proprietary binary format called TSAF. The connector includes a parser for this format so it can extract fields that are not stored as plain SQLite columns.
What Data Is Extracted
Section titled “What Data Is Extracted”| Field | Notes |
|---|---|
| Title, artist, album | From tracks table |
| Duration | From tracks table |
| File path | URL-decoded |
| ISRC code | From tracks table, when present |
| Streaming source | Spotify, Apple Music, Beatport, SoundCloud, TIDAL |
| Deck number | From playing state |
| Playback position | From playing state |
Platform Support
Section titled “Platform Support”- macOS — fully supported. Library path:
~/Music/djay. - Windows — supported (limited by djay Pro’s own Windows feature set).
What It Does Not Provide
Section titled “What It Does Not Provide”djay Pro does not expose channel fader or EQ state in the library database. For on-air detection on multi-deck djay setups, the MIDI Bridge captures controller state from any connected hardware and feeds it to the mix processor.
Streaming-source tracks (Spotify, Apple Music) do not have local files, so embedded artwork cannot be extracted. In those cases artwork is fetched via the server-side enrichment fallback described in Track Enrichment.