Skip to content

analysis: don't keep re-analyzing a track whose file is missing - #99

Merged
vynulldev merged 2 commits into
mainfrom
missing-file-analysis
Oct 18, 2026
Merged

vynulldev merged 2 commits into
mainfrom
missing-file-analysis

Conversation

@vynulldev

@vynulldev vynulldev commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

What & why

The web UI asks for a track's waveform each time it renders the row, and for a track with no analysis yet every request queued one. When the track's file is missing (an imported path that doesn't exist on this machine), each of those analyses ran ffmpeg and failed the same way. A CDJ test session with one missing track logged 14 failed analyses in two minutes, and it would carry on for as long as the row stayed on screen.

  • Queueing an analysis now checks that the file exists. A missing file is skipped, and the track is flagged as missing in the library, which the web UI shows.
  • The check runs on every request, so a file that comes back (restored, or relinked) is analyzed on the next one.
  • The lazy analysis a deck's request triggers skips a missing file too, instead of starting ffmpeg.
  • So does on-demand analysis, which the web UI's track drawer triggers for its waveform and beat grid: opening a missing track used to run three failing analyses at once.
  • Tracks that already have analysis are unaffected: a cached or imported analysis is still served when the file is gone.

New tests check that repeated requests for a missing file queue nothing and flag the track, that the track is queued once its file is back, and that on-demand analysis skips it; they fail without the fix. The existing queue test now uses real temporary files, since it relied on paths that don't exist. Conformance against rekordbox 7.2.19 is unchanged (3,054 of 4,250 exact, none gained or lost).

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

@vynulldev vynulldev added the bug Something isn't working label Oct 18, 2026
The web UI asks for a track's waveform on every render, and each request
for an unanalyzed track queued an analysis. For a track whose file is
missing, every one of those ran ffmpeg and failed the same way: a test
session logged 14 failed runs in two minutes for one missing track.

Queueing now checks that the file exists. A missing one is skipped and
the track flagged as missing in the library (shown in the web UI); the
check runs each time, so a file that comes back is analyzed then. The
lazy analysis a deck's request triggers skips missing files too.
Opening a missing track in the web UI's track drawer asks for its
waveform and beat grid, and each request ran an on-demand analysis that
failed in ffmpeg (three at a time in a test session). On-demand
analysis now skips a missing file the same way queued analysis does;
cached or imported analysis is still served.
@vynulldev
vynulldev force-pushed the missing-file-analysis branch from 00f9f3a to 5aa32dd Compare October 18, 2026 20:47
@vynulldev
vynulldev marked this pull request as ready for review October 18, 2026 20:48
@vynulldev
vynulldev merged commit ca91c00 into main Oct 18, 2026
1 check passed
@vynulldev
vynulldev deleted the missing-file-analysis branch October 18, 2026 20:49
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