Repository navigation
smart: match key rules across key notations - #98
Merged
Merged
Conversation
An import stores every track's key as Camelot ("8A"), but a rekordbox
smart rule carries the key name rekordbox showed ("Am"), so "key is Am"
matched nothing after an import. Key rules now treat a recognised key name
in either notation as that key: equality compares the keys, and contains,
starts with, and ends with test the track key's name in each notation.
Other text still compares as text, as rekordbox does.
The smart editor's key picker lists Camelot keys only, so a rule imported
with a classic name ("Am") had no matching option: the browser selected
the first key, and the editor's sync wrote it into the rule, so opening the
playlist changed it to 1A. The rule's own value is now kept as a selected
option (with its Camelot name), and the preview compares keys in either
notation, as the server does.
rekordbox's key conditions offer equals, not equals, contains, does not contain, starts with and ends with; the editor offered only equals, is not, and Vynull's own is compatible with. It now lists rekordbox's six (keeping is compatible with last), takes a typed value for the text operators, and previews them against the key's name in either notation, as the server matches them.
"Is compatible with" parsed only Camelot, so a key named in classic notation fell back to comparing text. Both sides now read as keys in either notation. The editor's key dropdown labels each key in both notations, led by the key display setting.
vynulldev
marked this pull request as ready for review
October 18, 2026 00:38
vynulldev
added a commit
that referenced
this pull request
Oct 18, 2026
An import stores keys as Camelot, but rekordbox key rules carry the
names rekordbox showed ("Am"), so imported key rules matched nothing.
Key equality now compares keys in either notation (enharmonics too),
and text operators test the key's name in each notation; other text
still compares as text. The web editor keeps an imported rule's key
instead of silently replacing it with the first listed key, and offers
rekordbox's key operators (equals, not equals, contains, does not
contain, starts with, ends with).
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
An import converts every track's key to Camelot ("8A") so the deck's KEY column shows one notation. A rekordbox smart rule on the key, though, carries the key name rekordbox showed, which in classic notation is "Am". After an import, "key is Am" therefore matched no track at all, and "key is not Am" matched every track.
The link-spec conformance suites didn't catch it, because the conformance server serves rekordbox's key names unconverted. It showed up on a CDJ-2000NXS2 with the synthetic test library, whose "Text: key is Am" playlist came up empty.
Server
Web editor
rekordbox compares key text against the key names it stores, which follow its Key Display Format: a classic-notation rule such as "Ab" only matched with the format set to Classic or "Display key information on the database" ticked (checked by hand in rekordbox's Preferences, View panel). Vynull stores Camelot after an import, so it deliberately accepts a key named in either notation rather than depending on a display setting.
Tests cover equality, inequality, enharmonics, contains and does-not-contain, starts with, spacing, and non-key text. Conformance against rekordbox 7.2.19 is unchanged (the smart suites stay at 743 exact).
Hardware testing
Checklist
go build ./...,go vet ./..., andgo test ./...passgofmt -l .is cleanGPL-3.0-or-later)