Import result can report total and processed items

This commit is contained in:
Philipp Wolfer 2023-11-12 18:40:45 +01:00
parent 516de905bd
commit ead323eaed
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
5 changed files with 14 additions and 7 deletions

View file

@ -58,7 +58,7 @@ func (b ScrobblerLogBackend) ExportListens(oldestTimestamp time.Time) ([]models.
func (b ScrobblerLogBackend) ImportListens(listens []models.Listen, oldestTimestamp time.Time) (models.ImportResult, error) {
result := models.ImportResult{
Count: 0,
TotalCount: len(listens),
LastTimestamp: oldestTimestamp,
}
@ -82,6 +82,6 @@ func (b ScrobblerLogBackend) ImportListens(listens []models.Listen, oldestTimest
}
result.LastTimestamp = lastTimestamp
result.Count = len(listens)
result.ImportCount = len(listens)
return result, nil
}