Consolidates in-progress work across autotag, explore, and library: - autotag: beets/Picard-informed scoring engine — ID-first matching, VA handling, recommendation tiers, and a merged distance/rank cascade, with an eval harness for regression tracking. - explore: offline MusicBrainz dump import/incremental refresh replaces the legacy tier crawl; index-first local search with fuzzy matching and a dedicated ranker; disk-free guards for dump downloads. - library: artist-credit extraction and matching. - lyrics: owned-library lyric search (FTS) with LRCLIB backfill. Also: rewrite README to be user-focused, and migrate upstream to git.ljones.me/yonlu/yellowjacket. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
20 lines
471 B
Go
20 lines
471 B
Go
//go:build unix
|
|
|
|
package explore
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
// diskFreeBytes returns the free bytes available to the current user
|
|
// on the filesystem containing path. ok is false when unknown.
|
|
func diskFreeBytes(path string) (free uint64, ok bool) {
|
|
var st unix.Statfs_t
|
|
|
|
if err := unix.Statfs(path, &st); err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
// Bavail/Bsize integer types vary by platform.
|
|
//nolint:unconvert,gosec
|
|
return st.Bavail * uint64(st.Bsize), true
|
|
}
|