feat: import with verification, and a Wanted view of its own (M502 #5522)
release / govulncheck (push) Successful in 14s
release / web (push) Failing after 15s
release / go (push) Failing after 1m16s
release / integration (push) Failing after 4m49s
release / android (push) Successful in 4m59s
release / Build signed APK (releases and dev) (push) Successful in 5m14s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Skipped
release / Verify release artifacts (tag releases only) (push) Skipped

A finished download is checked against MusicBrainz before anything is
filed: the files are paired with an edition's tracks by position or path,
and AcoustID, tag ids, lengths and titles say whether it is the album.
What is the album is copied into the library as
Artist/Album (Year)/Artist - Album - NN - Title, tagged with Picard's
MusicBrainz ids, and scanned; the download keeps seeding. What is not is
refused: set aside, removed from the client, and the album searched for
again. A download the check cannot settle waits for a person, who imports
it anyway or refuses it. Tracks the library already holds are skipped.

The wanted list leaves Admin for a top-level Wanted view, admin-only and
web-only, with tabs for Wanted, Activity (downloads and their imports,
the ones needing a person first), Missing files, Held, Following (with the
release-type profiles, moved off Integrations) and Blocked. The search
settings gain "File new music into" when the library has several folders.

The search pass logs why each failed search failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-10 10:36:21 -04:00
co-authored by Claude Opus 5.5
parent 77081f1cef
commit ebbc49b902
63 changed files with 4892 additions and 555 deletions
+13
View File
@@ -422,3 +422,16 @@ func notURLBase64(r rune) bool {
}
return true
}
// LookupFingerprint is the compressed fingerprint AcoustID's lookup takes and
// the file's whole length in seconds, for a file not in the library yet: the
// import checks a download with it (M502 #5522). IsInconclusive tells a
// missing or stalled fpcalc from a file it rejected.
func LookupFingerprint(ctx context.Context, path string) (fingerprint string, durationSec int, err error) {
fp, err := computeLookupFingerprint(ctx, path)
return fp.fingerprint, fp.durationSec, err
}
// IsInconclusive reports that a fingerprint tool could not give an answer
// (missing, timed out), as opposed to rejecting the file.
func IsInconclusive(err error) bool { return isInconclusive(err) }
+13
View File
@@ -674,3 +674,16 @@ func probeDurationMs(ctx context.Context, path string) (int32, error) {
}
return int32(ms), nil
}
// ProbeDurationMs is a file's length in milliseconds, read by ffprobe.
func ProbeDurationMs(ctx context.Context, path string) (int32, error) {
return probeDurationMs(ctx, path)
}
// IsAudioFile reports whether the scanner reads a file with this name.
func IsAudioFile(path string) bool {
return audioExtensions[strings.ToLower(filepath.Ext(path))]
}
// Roots are the folders the scanner reads: the library.
func (s *Scanner) Roots() []string { return append([]string(nil), s.paths...) }