Skip to main content

Crate prolink_rekordbox

Crate prolink_rekordbox 

Source
Expand description

Readers for the files on a rekordbox device export.

What rekordbox writes to a USB stick or SD card, and what a Pro DJ Link server has to read back in order to browse and serve it. No network and no I/O policy: every entry point here takes bytes a caller has already obtained, because on this protocol they usually arrive over NFS from a device we do not control rather than from a local file.

ModuleFile
pdbPIONEER/rekordbox/export.pdbtracks, artists, playlists — the DeviceSQL database
anlzPIONEER/USBANLZ/**/ANLZ####.DAT, .EXTbeat grid, cues, waveforms, VBR seek index
settingsPIONEER/*SETTING*.DATthe utility settings a deck adopts from a medium
library—the pdb’s foreign keys joined into browsable tracks

§Endianness is not uniform, and that is the point

export.pdb is little-endian. The ANLZ files it points at are big-endian. A path is UTF-16BE inside an ANLZ file and UTF-16LE inside the pdb, and both differ from how the same path travels over the wire. These must never share a helper; the one time two of them were conflated, the two errors cancelled exactly for ASCII and the bug surfaced months later, on someone’s non-ASCII album name, as a failed track load (O6).

§Three things that have cost this project sessions

  • The UTF-16 string form starts at offset + 4 and is little-endian. See string. A round-trip test cannot catch getting this wrong.
  • Row offset 0x5a of a track is the container, not padding. See pdb::Container and F34.
  • The pdb header’s sequence counter changes under you. See pdb::stable_digest and F13.

§Provenance

Non-obvious constants carry the finding that establishes them — F<n> for a finding, C<n> for a correction to the pre-hardware literature, O<n> for an observation. Where a value is reproduced without being understood, or inferred rather than measured, the doc comment says so in those words.

The pdb reader is pinned against a real 675 KB, 165-page export; the ANLZ and settings readers are not, because no such file was available, and their module docs say so.

Re-exports§

pub use anlz::AnlzFile;
pub use anlz::FourCc;
pub use anlz::Tag;
pub use library::HistoryPlaylist;
pub use library::Library;
pub use library::Playlist;
pub use library::Summary;
pub use library::Track;
pub use pdb::Container;
pub use pdb::PageType;
pub use pdb::Pdb;
pub use pdb::StableDigest;
pub use pdb::stable_digest;
pub use settings::SettingsFile;
pub use string::DeviceSqlString;

Modules§

anlz
ANLZ####.DAT / .EXT — what rekordbox learned about one track.
library
The joined library: an export.pdb with its foreign keys resolved.
pdb
export.pdb — the DeviceSQL database rekordbox writes to a medium.
settings
PIONEER/*SETTING*.DAT — the “My Settings” files a player adopts.
string
The variable-length string export.pdb stores every name in.

Structs§

HexBytes
A short byte string rendered as hex in error messages.

Enums§

Error
What went wrong reading a file off a rekordbox medium.

Type Aliases§

Result
Result alias for this crate.