Skip to content

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.

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.

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.

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.

FieldNotes
Title, artist, albumFrom tracks table
DurationFrom tracks table
File pathURL-decoded
ISRC codeFrom tracks table, when present
Streaming sourceSpotify, Apple Music, Beatport, SoundCloud, TIDAL
Deck numberFrom playing state
Playback positionFrom playing state
  • macOS — fully supported. Library path: ~/Music/djay.
  • Windows — supported (limited by djay Pro’s own Windows feature set).

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.