Skip to content

Add public read-only accessors for PDB row fields#236

Open
cjchanh wants to merge 1 commit intoHolzhaus:mainfrom
cjchanh:feat/pub-accessors-and-docs
Open

Add public read-only accessors for PDB row fields#236
cjchanh wants to merge 1 commit intoHolzhaus:mainfrom
cjchanh:feat/pub-accessors-and-docs

Conversation

@cjchanh
Copy link
Copy Markdown

@cjchanh cjchanh commented Apr 26, 2026

Summary

Adds read-only public accessors for private PDB row fields on Album, Artist, Artwork, Genre, Key, Label, and Track.

This does not change binary layout, parser behavior, write behavior, or existing public types.

Motivation

Downstream read-only tools need access to parsed rekordbox PDB metadata without reimplementing the parser or depending on incompatible alternatives. The currently parsed row structs contain the data, but most useful fields are private.

The concrete downstream use case is resolving track metadata from rekordbox device exports while keeping USB/library handling read-only and non-mutating.

Changes

  • Album: id, artist_id, name
  • Artist: id, name
  • Artwork: id, path
  • Genre: id, name
  • Key: id, name
  • Label: id, name
  • Track: id, artist_id, album_id, genre_id, key_id, artwork_id, sample_rate, bitrate, tempo_centi_bpm, play_count, year, duration_seconds, rating, title, filename, file_path, comment, analyze_path

Every new public method has a one-line doc comment and returns either a copyable ID/scalar field or a borrowed &DeviceSQLString.

Validation

Validated against current Holzhaus/rekordcrate main at:

20f02677700025288994bcd84f0f115e2fc2b0ec

Checks:

  • cargo build: PASS
  • cargo test: PASS
  • Test result: 167 tests passed, including doc tests

Patch file BLAKE3:

e99772a12c1cba8d707dd09e3d947705f9ca0649e5d65f150be36992120f6f1c

Notes

This PR intentionally excludes downstream-only warning overrides used by a vendored release-mode verification copy. This PR contains only the public accessor patch.

This patch was regenerated against current upstream main; it is not the archived rekordcrate-0.3.0 patch from the downstream extraction package.

Adds read-only public accessors for private PDB row fields on Album,
Artist, Artwork, Genre, Key, Label, and Track. Does not change binary
layout, parser behavior, write behavior, or existing public types.

Every new public method has a one-line doc comment and returns either
a copyable ID/scalar field or a borrowed &DeviceSQLString.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant