mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-18 11:46:34 -07:00
feat: time-gated imports via cfg
This commit is contained in:
parent
6d000d87e4
commit
c14df8c2fb
6 changed files with 59 additions and 4 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue