feat: Minstrel stops acquiring music and drops Discover
release / go (push) Successful in 1m54s
release / web (push) Failing after 5s
release / integration (push) Failing after 3m44s
release / govulncheck (push) Successful in 20s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / Build signed APK (push) Canceled after 19s
release / android (push) Canceled after 2m37s
release / go (push) Successful in 1m54s
release / web (push) Failing after 5s
release / integration (push) Failing after 3m44s
release / govulncheck (push) Successful in 20s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / Build signed APK (push) Canceled after 19s
release / android (push) Canceled after 2m37s
Minstrel is now a viewer of the library it is pointed at. Finding, downloading and filing music moves out of it. Removed from the server: - the request flow (requests, approval, auto-approve) and the wanted list, follows, release profiles and release blocks; - searching indexers, the download clients, the importer, the album lifecycle and missing-file re-acquisition; - the catalogue's discography, search and art (the MusicBrainz release and track-list cache stays, for the duplicate resolver); - Discover: its suggestions of artists not in the library, snoozes, the candidate-artist tag enrichment and its tuning scope; - writes to acquisition tables from moving the library folder and from merging duplicates, the want-list join on Suspect sources, the sealing of acquisition credentials, and the release-group lookup only re-acquisition used. Settling a wrong-slot duplicate no longer sets the release aside: the copies go and their slots show as missing until a good copy is in the library. Removed from the web: Admin > Acquisition and Requests, /requests, /discover, Follow on the artist page, the auto-approve toggle, and the Collection's wanted-list tabs. The Collection is now the library's health: an overview, Reports, Duplicates, Suspect sources and Missing files. The README and docs no longer describe getting music. The tables stay for now; a later migration drops them. The request notification kinds and the Android screens are still to go. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+5
-58
@@ -25,16 +25,12 @@ import (
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/eventbus"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/gc"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/importer"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/lifecycle"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/logging"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/mailer"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/notifications"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/playlists"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/reacquisition"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/recsettings"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/requests"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/scrobble"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/scrobble/listenbrainz"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/secret"
|
||||
@@ -43,7 +39,6 @@ import (
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/subsonic"
|
||||
syncpkg "git.fabledsword.com/bvandeusen/minstrel/internal/sync"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/tags"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/wanted"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -203,8 +198,8 @@ func run() error {
|
||||
if acoustIDErr != nil {
|
||||
logger.Warn("acoustid settings: using defaults (lookup off)", "err", acoustIDErr)
|
||||
}
|
||||
// One AcoustID client, so the lookup worker and the import's check share
|
||||
// its pace (AcoustID allows three requests a second per key).
|
||||
// One AcoustID client, so every lookup shares its pace (AcoustID allows
|
||||
// three requests a second per key).
|
||||
acoustIDClient := acoustid.New(acoustid.DefaultBaseURL)
|
||||
acoustIDLookup := library.NewAcoustIDLookupWorker(pool, logger.With("component", "acoustid_lookup"),
|
||||
acoustIDSettings, acoustIDClient)
|
||||
@@ -355,44 +350,12 @@ func run() error {
|
||||
// same pool and bus.
|
||||
notifier := notifications.New(pool, bus, logger.With("component", "notifications"))
|
||||
|
||||
// The request reconciler completes approved requests once the library
|
||||
// holds what they asked for.
|
||||
requestReconciler := requests.NewReconciler(pool, logger.With("component", "requests"), bus)
|
||||
requestReconciler.SetNotifier(notifier)
|
||||
library.SetNotifier(notifier)
|
||||
go requestReconciler.Run(ctx)
|
||||
|
||||
// Release catalogue: re-reads discographies older than a
|
||||
// week from MusicBrainz, a batch an hour, through the process-wide
|
||||
// MusicBrainz pacer it shares with tag enrichment.
|
||||
// Release track lists from MusicBrainz, read on demand by the duplicate
|
||||
// resolver through the process-wide MusicBrainz pacer it shares with tag
|
||||
// enrichment.
|
||||
cat := catalogue.New(pool, nil, logger.With("component", "catalogue"))
|
||||
go cat.Run(ctx)
|
||||
|
||||
// The wanted list: reads followed artists' discographies
|
||||
// daily for new releases and marks wants held once the library has them.
|
||||
go wanted.New(pool, cat, logger.With("component", "wanted")).Run(ctx)
|
||||
|
||||
// Search and grab: every ten minutes, searches the
|
||||
// configured indexers for wants due, paced by each source's
|
||||
// searches-per-hour, and hands the best release to the download client
|
||||
// when auto-grab is on.
|
||||
go wanted.NewSearcher(pool, cat, logger.With("component", "search")).Run(ctx)
|
||||
|
||||
// Import with verification: every minute, finished
|
||||
// downloads are checked against their album (AcoustID, lengths, tags)
|
||||
// and filed into the library with MusicBrainz tags, or refused.
|
||||
var printer importer.Printer
|
||||
if acoustIDSettings != nil {
|
||||
printer = &importer.AcoustIDPrinter{Settings: acoustIDSettings, Client: acoustIDClient}
|
||||
}
|
||||
imp := importer.New(pool, scanner, cat, printer, scanner.Roots, logger.With("component", "import"))
|
||||
imp.DataDir = cfg.Storage.DataDir
|
||||
go imp.Run(ctx)
|
||||
|
||||
// Download lifecycle: every ten minutes, a download that
|
||||
// failed or that nobody shares is retried, then given up and its album
|
||||
// searched again; an imported one seeds, then is removed.
|
||||
go lifecycle.New(pool, logger.With("component", "lifecycle")).Run(ctx)
|
||||
|
||||
// Duplicate resolver: classifies the sweep's groups and, with auto-resolve
|
||||
// on, merges the copies that are safe to merge.
|
||||
@@ -404,19 +367,6 @@ func run() error {
|
||||
TrackLists: cat.RefreshReleaseGroup, Identify: acoustIDLookup.IdentifyRecordings,
|
||||
}).Run(ctx)
|
||||
|
||||
// Missing-file re-acquisition: wants back albums whose files have been
|
||||
// gone longer than the grace window, for the search schedule to find.
|
||||
// Hourly, because the grace window is measured in hours.
|
||||
//
|
||||
// A settings-load failure is logged, not fatal: NewSettingsService always
|
||||
// returns a usable service holding the defaults.
|
||||
reacqSettings, reacqErr := reacquisition.NewSettingsService(
|
||||
ctx, pool, logger.With("component", "reacquisition"))
|
||||
if reacqErr != nil {
|
||||
logger.Warn("reacquisition: using default settings", "err", reacqErr)
|
||||
}
|
||||
go reacquisition.NewSweeper(pool, reacqSettings, logger.With("component", "reacquisition")).Run(ctx)
|
||||
|
||||
// library_changes compactor: daily, deletes
|
||||
// rows older than the configured retention so the change-log table
|
||||
// doesn't grow unbounded. Clients that drop offline longer than
|
||||
@@ -495,9 +445,6 @@ func run() error {
|
||||
srv.FingerprintSettings = fpSettings
|
||||
srv.LoudnessSettings = loudSettings
|
||||
srv.AcoustIDLookup = acoustIDLookup
|
||||
// The sweeper above holds this same instance, so a save from the admin
|
||||
// card changes what it does on its next tick.
|
||||
srv.ReacqSettings = reacqSettings
|
||||
// The server's own backup: the loop runs the nightly schedule, and the
|
||||
// admin page starts, tests and configures the same instance.
|
||||
backups := backup.NewService(pool, logger.With("component", "backup"), buildinfo.Version)
|
||||
|
||||
Reference in New Issue
Block a user