mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 21:57:06 +02:00
Add ImportResult.UpdateTimestamp method
This commit is contained in:
parent
298697dcfc
commit
729a3d0ed0
6 changed files with 39 additions and 30 deletions
|
@ -158,10 +158,8 @@ func (b ListenBrainzApiBackend) ImportLoves(loves []models.Love, oldestTimestamp
|
|||
}
|
||||
|
||||
if ok {
|
||||
result.UpdateTimestamp(love.Created)
|
||||
result.ImportCount += 1
|
||||
if love.Created.Unix() > result.LastTimestamp.Unix() {
|
||||
result.LastTimestamp = love.Created
|
||||
}
|
||||
} else {
|
||||
msg := fmt.Sprintf("Failed import of \"%s\" by %s: %v",
|
||||
love.TrackName, love.ArtistName(), errMsg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue