Repository navigation
dbserver: fix TRACK INFO jumps (category IDs and the selected track) - #89
Merged
Merged
Conversation
On a CDJ-2000NXS2, TRACK INFO's ARTIST and ALBUM jumps opened an empty menu. The deck jumps by the ID carried in each Display Song Info (0x2002) row, and ours carried the track's ID in the artist and album rows and 0 in the genre and label rows, so the deck asked for a category entry that doesn't exist. BPM and KEY worked because their rows carried real values. The rows now carry the category's ID, as rekordbox's do: artist, album, genre, label, key, original artist and remixer, with rekordbox's own IDs for an imported library and the IDs the category menus list otherwise. The label row also carries the label's name, as rekordbox's does. The track list's original-artist detail column looked up the ID under "original_artist" while the ORIGINAL ARTIST menu and the import use "origartist", so its ID didn't match the menu's; it uses "origartist" now.
TRACK INFO jumps opened the right list but left the cursor on its first row. After opening the list the deck asks 0x3100 for the loaded track's position in it, and we only ever looked IDs up in the root menu, so the answer was always 0. 0x3100 is rekordbox's CMD_GET_OFFSET_CONTENTID (GetListBufOffset): the position of an ID in the list loaded at the request's menu location. It now looks there; location 7 is still the root menu, which the SHORT CUT buttons use (a rekordbox capture shows their requests at location 7). An ID not in the list still answers 0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
On a CDJ-2000NXS2, choosing ARTIST or ALBUM in a loaded track's TRACK INFO should open that artist or album in its menu; it opened an empty menu instead.
The deck jumps by the ID carried in each Display Song Info (
0x2002) row. rekordbox puts the category's ID there: the artist's ID in the artist row, the album's in the album row, and so on (link-spec Display Song Info goldens). Ours carried the track's ID in the artist and album rows and 0 in the genre and label rows, so the deck asked for an artist or album that doesn't exist. BPM and KEY jumps worked because their rows already carried real values.The artist, album, genre, label, key, original artist and remixer rows now carry the category's ID: rekordbox's own IDs for an imported library, otherwise the IDs the category menus list. The label row also carries the label's name, as rekordbox's does.
The track list's original-artist detail column looked up its ID under a different name than the ORIGINAL ARTIST menu and the import, so its ID didn't match the menu's. It uses the same one now.
After a jump the deck asks
0x3100(rekordbox'sCMD_GET_OFFSET_CONTENTID) where the loaded track sits in the list it opened, to put the cursor on it. We only ever looked IDs up in the root menu, so the answer was always 0 and the cursor sat on the first row. It now looks in the list at the request's menu location; location 7 is still the root menu, which the SHORT CUT buttons use (their requests are at location 7 in a rekordbox capture).With the right IDs, the deck's jump sends
0x3603(CMD_GET_DB_HIERARCHY, a position lookup we still answer generically) and then fetches the target menu itself, as it already did for BPM and KEY.Tests check all seven category rows (failing on main) and the list offset lookup.
Conformance against rekordbox 7.2.19 is unchanged (2,304 of 4,250 exact, no case gained or lost). The Display Song Info suites still differ elsewhere (row order and other fields), so these IDs alone complete no case.
Hardware testing
Checklist
go build ./...,go vet ./..., andgo test ./...passgofmt -l .is cleanGPL-3.0-or-later)