Skip to content

fix: tracks read from a OneLibrary USB report their real length (NP3-414) - #1

Merged
chrisle merged 1 commit into
mainfrom
fix/NP3-414-duration-seconds
Sep 26, 2026
Merged

chrisle merged 1 commit into
mainfrom
fix/NP3-414-duration-seconds

Conversation

@chrisle

@chrisle chrisle commented Sep 26, 2026

Copy link
Copy Markdown
Owner

OneLibraryAdapter divided content.length by 1000 on the assumption that it is milliseconds. rekordbox writes it in whole seconds — the same unit as the PDB's track duration. Three real exportLibrary.db exports read 195, 390, 297… for normal-length tracks.

Downstream, Now Playing's mix processor treats a track as finished once it has been registered longer than its duration allows (NP3-405). A four-minute track that reports 0.25 s is "stale" two minutes after it was registered, so any deck that went on air later than that never reached the overlay. Sentry shows 790 of those suppressions across six users in 30 days (NP3-414, XDJ-XZ report).

  • duration is content.length as stored
  • The fixture's lengths are rewritten in seconds; the test that asserted the ÷1000 now asserts the stored value and fails on the old code

…ad of a quarter of a second

- Read content.length as whole seconds, the unit rekordbox writes, checked against three real exportLibrary.db exports
- Store the test fixture's lengths in seconds and assert them as stored
@chrisle
chrisle merged commit ecd7c96 into main Sep 26, 2026
2 checks passed
@chrisle
chrisle deleted the fix/NP3-414-duration-seconds branch September 26, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant