Repository navigation
library: import rekordbox's colour names (djmdColor) - #196
Merged
Merged
Conversation
rekordbox lets a library rename its eight track colours (djmdColor's Commnt), and serves the names wherever a colour is named: the COLOR menu, a colour second column and TRACK INFO (link-spec SORT_AND_COLOR_ORACLE.md, "Custom color labels"). Vynull always served the stock names, Pink to Purple. A master.db import with settings now brings the names. The library keeps the ones that differ from the stock names, in colors.json beside the track list (beside the overlay for a music dir, as the tag list), and the COLOR menu, both colour second-column paths, TRACK INFO, the song-info title and the web UI's track info serve them. A colour second column keeps 127 characters, as the other lookup names do.
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
rekordbox lets a library rename its eight track colours (stored in
djmdColor's Commnt), and serves the names wherever a colour is named: the COLOR menu, a colour second column and TRACK INFO. link-spec records this in SORT_AND_COLOR_ORACLE.md ("Custom color labels") and the custom-colors suite. Vynull always served the stock names, Pink to Purple.Changes:
djmdColor, and a master.db import with settings brings the names, as it brings the SORT menu and the root categories.colors.jsonbeside the track list, or beside the overlay for a music dir, like the tag list (whose path logic they now share). A change moves the library's revision, so served rows pick it up.A library without renamed colours, like mine, is unchanged. The web UI's colour picker still shows the stock names.
Tests:
TestColorNames: replacing names, dropping stock, empty and out-of-range ones, the revision, and a reload.TestCustomColorNames: the COLOR menu, the colour column, the override's 127-character cut and TRACK INFO.Both use the new library calls, so they don't build on main.
Conformance against main, on the default-settings fixtures: 3,682 to 3,693 of 4,250 cases exact (+11, none lost): custom-colors +2, display-song-info-boundaries +8 and secondary-string-boundaries +1.
Cost: none:
BenchmarkRenderPageandBenchmarkTrackList(default, and changed, which rebuilds every row of a 20k-track library) keep the same bytes and allocations per request, with times within noise over six alternating runs.Build, vet, gofmt, all tests, the race detector on the API, the dbserver and the library, and the e2e suite pass.
Hardware testing
Checklist
go build ./...,go vet ./..., andgo test ./...passgofmt -l .is cleanGPL-3.0-or-later)