Skip to content

dbserver: match rekordbox's Play and Delivery song info, and render windows - #88

Merged
vynulldev merged 1 commit into
mainfrom
conformance-siblings
Oct 16, 2026
Merged

vynulldev merged 1 commit into
mainfrom
conformance-siblings

Conversation

@vynulldev

@vynulldev vynulldev commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

What & why

link-spec's song-info sibling suites (rekordbox 7.2.19) showed three gaps in how we answer a deck's song-information requests.

  • Play Song Info (0x2102), the seven rows a deck reads to load a track: for library tracks the comment row was empty and the key row carried ID 0, and a Windows drive path went out as /Z:/.... It now carries the track's comment, rekordbox's key ID (as the KEY menu does), and a drive path as rekordbox sends it, Z:/.... Any other path keeps its leading slash, which the deck needs to open the file over NFS; a drive path only appears for an imported file that isn't on this machine.
  • Delivery Info (0x2602) had no handler and answered an empty list. It now returns rekordbox's 13 rows: composer, BPM, DeliveryComment, key, file type, genre, label, artist, lyricist, DeliveryControl/ISRC, the track row, album and length. We store none of the delivery-only fields (composer, lyricist, DeliveryComment, ISRC, DeliveryControl), so those carry rekordbox's values for unset fields. The rows come in rekordbox's base order. rekordbox itself permutes them according to earlier requests, through its reused list storage (link-spec SONG_INFO_SIBLINGS_ORACLE.md); that isn't reproduced, and decks read each row by its type.
  • Render windows now follow rekordbox's normalization (link-spec PROTOCOL_REFERENCE.md, "Render ranges and pagination"): a zero count reads one row, a window running past the end slides back to end on the last row, a count larger than the list reads all of it, and offset 0xffffffff gets no reply. Real decks ask for in-range windows, so they see no change.

Tests cover the Play and Delivery rows and rekordbox's eight-row pagination sweep.

Conformance against rekordbox 7.2.19: 119 more cases match exactly and 1 fewer (2,304 to 2,422 of 4,250); 161 more match on outcome, total and row count. All 21 Play cases now match in each sibling-render suite. The window rules also gained cases in the pagination, search and smart-playlist suites. The one lost case is a rekordbox parser-state quirk: a location-2 Delivery request returns no rows only when it directly follows a request with a blob-valued content ID, as it does in that suite; otherwise rekordbox returns 13 rows, as we now do. The remaining Delivery render cases differ in row order or render-time secondary column.

Hardware testing

  • Tested on: CDJ-2000NXS2

Checklist

  • go build ./..., go vet ./..., and go test ./... pass
  • gofmt -l . is clean
  • New source files carry an SPDX header (GPL-3.0-or-later)
  • Tested on real hardware (deck + firmware noted above), or this change doesn't affect deck behaviour
  • I agree my contribution is licensed under the project's GPLv3

@vynulldev
vynulldev marked this pull request as ready for review October 16, 2026 00:19
…indows

link-spec's song-info sibling suites (rekordbox 7.2.19) showed three gaps.

- Play Song Info (0x2102) left the comment row empty and sent key ID 0 for library tracks, and sent a Windows drive path as "/Z:/...". It now carries the track's comment, rekordbox's key ID (as the KEY menu does), and a drive path as rekordbox sends it, "Z:/..."; any other path keeps its leading slash, which the deck needs to open the file over NFS. A drive path only appears for an imported file that isn't on this machine.
- Delivery Info (0x2602) had no handler and answered an empty list. It now returns rekordbox's 13 rows: composer, BPM, DeliveryComment, key, file type, genre, label, artist, lyricist, DeliveryControl/ISRC, the track row, album and length. We store none of the delivery-only fields, so they carry rekordbox's values for unset fields. The rows come in rekordbox's base order; rekordbox permutes them according to earlier requests (its reused list storage), which isn't reproduced.
- Render windows now follow rekordbox's normalization (PROTOCOL_REFERENCE, "Render ranges and pagination"): a zero count reads one row, a window running past the end slides back to end on the last row, a count larger than the list reads all of it, and offset 0xffffffff gets no reply. Real decks ask for in-range windows, so they see no change.

Tests cover the Play and Delivery rows and rekordbox's eight-row pagination sweep.
@vynulldev
vynulldev force-pushed the conformance-siblings branch from d6d62e5 to defce62 Compare October 16, 2026 00:21
@vynulldev
vynulldev merged commit d831f82 into main Oct 16, 2026
1 check passed
@vynulldev
vynulldev deleted the conformance-siblings branch October 16, 2026 01:10
@vynulldev vynulldev added the bug Something isn't working label Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant