Skip to content

smart playlists: match rekordbox's string rules across every text property - #93

Merged
vynulldev merged 2 commits into
mainfrom
conformance-smart-strings
Oct 16, 2026
Merged

vynulldev merged 2 commits into
mainfrom
conformance-smart-strings

Conversation

@vynulldev

@vynulldev vynulldev commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

What & why

link-spec's smart-string-property-matrix (rekordbox 7.2.19) runs one value sequence through every text property of an imported smart playlist: Alpha, alpha, precomposed Álpha, decomposed A + combining acute, fullwidth Alpha, Alpha Beta, Beta Alpha, Beta, empty, and missing. Every property gives rekordbox the same member sets. We matched none of the 104 cases.

Smart playlist matching

  • Text comparisons now also ignore fullwidth versus ASCII forms, katakana versus hiragana, and final sigma, as rekordbox's do, besides case and precomposed accents.
  • "Does not contain" skips tracks whose value is empty or missing; "not equal" keeps them.
  • Key "equals" and "not equal" compare the key's name like any other text, instead of as an exact string.
  • albumArtist (the album's artist), producer (rekordbox's ComposerID) and mixName (Subtitle) are now imported and matched; they matched nothing before. These need a re-import.

Key column (every track list showing it)

  • Rows carry the track's own key ID from the import, so an empty-named key keeps its row ID and a track with no key carries 0.
  • The text is <key> - <bpm> bpm even for an empty key, as rekordbox shows it.
  • The 1-24 key index reads a non-standard key name loosely, as rekordbox does ("Alpha" is A major, "Beta" B major); real key names are unaffected.

MyTag import and the smart editor

  • Imported MyTags came out incomplete and shuffled. djmdMyTag holds both the columns (Genre, Components, ...) and their tags, and the importer told them apart by track count, so tags nobody had assigned yet were dropped as if they were columns, empty columns vanished, and tags were numbered in the order tracks referenced them. The dump now exports each row's Seq and column flag (skipping deleted rows and duplicate assignments), and the import keeps every live column and tag, used or not, in rekordbox's order. Checked against a real rekordbox backup: four columns, including an empty one, and all 47 live tags in order, two of them unused.
  • Imported smart playlists with tag rules opened in the web UI with empty tag dropdowns: the editor read a tag catalog only the TAGS tab loaded. It now loads the catalog before opening, selects a rule's tag case-insensitively, and keeps a tag name that isn't in the catalog instead of replacing it on save.

Tests cover the member sets for six properties, the text folding, the loose key index, the empty-key column, and the MyTag import order.

Conformance against rekordbox 7.2.19: 111 more cases match exactly and none stop matching (2,653 to 2,764 of 4,250): 101 of 104 in smart-string-property-matrix, plus 7 in smart-text-matrix and 3 in smart-property-matrix. The other three string cases are "file name" rules on tracks whose stored file name is empty: rekordbox matches its stored name, and we derive the name from the path.

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

…perty

link-spec's smart-string-property-matrix (rekordbox 7.2.19) runs the same value sequence (Alpha, alpha, Álpha precomposed and decomposed, fullwidth Alpha, Alpha Beta, Beta Alpha, Beta, empty, missing) through every text property; every property gives the same member sets. We matched none of its 104 cases.

- Text matching ignores fullwidth versus ASCII forms, katakana versus hiragana and final sigma, as rekordbox's does, besides case and precomposed accents.
- "Does not contain" skips empty and missing values; "not equal" keeps them.
- Key equality compares the key's name like any other text, not as an exact string.
- albumArtist (the album's artist), producer (ComposerID) and mixName (Subtitle) are imported and matched; they matched nothing before.

The Key column also follows rekordbox: rows carry the track's own key ID from the import (an empty-named key keeps its row ID, no key is 0), the text is "<key> - <bpm> bpm" even for an empty key, and the 1-24 key index reads a non-standard key name loosely, as rekordbox does ("Alpha" is A major); real key names are unaffected.

Tests cover the member sets for six properties, the text folding, the loose key index and the empty-key column.
…mart editor

MyTags imported from a rekordbox library came out incomplete and shuffled. djmdMyTag holds both the columns (Genre, Components, ...) and the tags under them, and the importer told them apart by track count: a row with no tracks was taken for a column. So tags nobody had assigned yet were dropped, as were empty columns, and tags were numbered in the order tracks happened to reference them rather than rekordbox's.

- The dump exports each row's Seq and column flag (Attribute 1), skips deleted tags and assignments, and lists a track once per tag.
- The import keeps every live column and tag, used or not, ordered as rekordbox shows them: columns by Seq, then each column's tags by Seq. Columns are created first, so an empty one exists too.

Imported smart playlists with tag rules also opened in the web UI with empty tag dropdowns: the editor read a tag catalog loaded only by the TAGS tab. It now loads the catalog before opening, selects a rule's tag case-insensitively, and keeps a tag name that isn't in the catalog rather than replacing it on save.

Checked against a real rekordbox backup: four columns, including an empty one, and all 47 live tags in rekordbox's order, two of them unused.
@vynulldev
vynulldev marked this pull request as ready for review October 16, 2026 23:03
@vynulldev
vynulldev merged commit 2e48d89 into main Oct 16, 2026
1 check passed
@vynulldev
vynulldev deleted the conformance-smart-strings branch October 16, 2026 23:06
@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