feat: time-gated imports via cfg

This commit is contained in:
Gabe Farrell 2025-06-13 05:36:41 -04:00
parent 6d000d87e4
commit c14df8c2fb
6 changed files with 59 additions and 4 deletions

View file

@ -93,6 +93,10 @@ func ImportLastFMFile(ctx context.Context, store db.DB, mbzc mbz.MusicBrainzCall
} else {
ts = time.Unix(unix, 0).UTC()
}
if !inImportTimeWindow(ts) {
l.Debug().Msgf("Skipping import due to import time rules")
continue
}
opts := catalog.SubmitListenOpts{
MbzCaller: mbzc,
Artist: track.Artist.Text,