Repository navigation
smart playlists: match rekordbox's string rules across every text property - #93
Merged
Merged
Conversation
…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.
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
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, decomposedA+ combining acute, fullwidthAlpha,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
albumArtist(the album's artist),producer(rekordbox'sComposerID) andmixName(Subtitle) are now imported and matched; they matched nothing before. These need a re-import.Key column (every track list showing it)
<key> - <bpm> bpmeven for an empty key, as rekordbox shows it.MyTag import and the smart editor
djmdMyTagholds 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'sSeqand 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.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 insmart-text-matrixand 3 insmart-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
Checklist
go build ./...,go vet ./..., andgo test ./...passgofmt -l .is cleanGPL-3.0-or-later)