mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 13:47:05 +02:00
Replaced ImportResult.ImportErrors with ImportResult.ImportLog
This commit is contained in:
parent
91f9b62db3
commit
8a2ddb7772
5 changed files with 55 additions and 13 deletions
|
@ -236,7 +236,7 @@ func (b *LastfmApiBackend) ImportListens(export models.ListensResult, importResu
|
|||
for _, s := range result.Scrobbles {
|
||||
ignoreMsg := s.IgnoredMessage.Body
|
||||
if ignoreMsg != "" {
|
||||
importResult.ImportErrors = append(importResult.ImportErrors, ignoreMsg)
|
||||
importResult.Log(models.Warning, ignoreMsg)
|
||||
}
|
||||
}
|
||||
err := fmt.Errorf("last.fm import ignored %v scrobbles", count-accepted)
|
||||
|
@ -335,7 +335,7 @@ func (b *LastfmApiBackend) ImportLoves(export models.LovesResult, importResult m
|
|||
} else {
|
||||
msg := fmt.Sprintf("Failed import of \"%s\" by %s: %v",
|
||||
love.TrackName, love.ArtistName(), err.Error())
|
||||
importResult.ImportErrors = append(importResult.ImportErrors, msg)
|
||||
importResult.Log(models.Error, msg)
|
||||
}
|
||||
|
||||
progress <- models.Progress{}.FromImportResult(importResult)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue