Skip to content

dbserver: serve an imported date added as rekordbox stored it - #194

Merged
vynulldev merged 1 commit into
mainfrom
date-added-text
Nov 19, 2026
Merged

vynulldev merged 1 commit into
mainfrom
date-added-text

Conversation

@vynulldev

Copy link
Copy Markdown
Owner

What & why

rekordbox serves a track's Date Added (djmdContent.StockDate) as stored, whatever text it holds: in the Date Added column, by the render override, and in TRACK INFO and Delivery Info. Vynull parsed it into a date on import and formatted it again, so any stored text that isn't a clean YYYY-MM-DD came out empty. link-spec records these values in its string-threshold, boundary and Display Song Info suites.

Changes:

  • Import: a master.db import keeps the stored text when it isn't the date it parses to (Track.DateAddedText, cut at a NUL as rekordbox's strings are). Every canonical date needs nothing extra, so a real library's import is unchanged.
  • Serving: the Date Added column, the render override, sorting by date added, TRACK INFO and Delivery Info read Track.DateAddedString: that text, else the date as before. Smart playlists still read the parsed date.
  • Limits: the render override cuts a date added to 255 characters and leaves a render unanswered when its text still takes more than 255 UTF-16 units, as it already did for a comment (link-spec's secondary string limits).

Tests:

  • TestStoredDateText: canonical, empty, reformatted and non-date text, and a NUL.
  • TestDateAddedStoredText: the Date Added column, the override's 255-character cut and its 256-unit stall, and TRACK INFO.

Both use the new field, so they don't build on main.

Conformance against main, on the default-settings fixtures: 3,658 to 3,676 of 4,250 cases exact (+18, none lost): display-song-info-unicode-boundaries +8, secondary-string-thresholds +6, secondary-unicode-thresholds +3 and display-song-info-invalid +1. The remaining date-added cases now stall the render as rekordbox does and differ only in the harness's timeout label, as the comment cases already did. The Display Song Info and Delivery cases that also carry custom colour names are left for that change.

Cost: none: BenchmarkTrackList (default, and changed, which rebuilds every row of a 20k-track library) keeps 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 dbserver and the library, and the e2e suite pass.

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

rekordbox serves a track's Date Added (StockDate) as stored, whatever
text it holds. Vynull parsed it into a date on import and formatted it
again, so any stored text that isn't a clean YYYY-MM-DD came out empty.

A master.db import now keeps the stored text when it isn't the date it
parses to (Track.DateAddedText; every canonical date needs nothing
extra), and the Date Added column, the render override, sorting by date
added, TRACK INFO and Delivery Info serve Track.DateAddedString: that
text, else the date. Smart playlists still read the parsed date.

The render override cuts a date added to 255 characters and leaves a
render unanswered when its text still takes more than 255 UTF-16 units,
as it already does for a comment (link-spec's secondary string limits).
@vynulldev vynulldev added the bug Something isn't working label Nov 18, 2026
@vynulldev
vynulldev merged commit 50932f9 into main Nov 19, 2026
1 check passed
@vynulldev
vynulldev deleted the date-added-text branch November 19, 2026 20:35
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