mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-27 22:47:57 +02:00
Import result can report total and processed items
This commit is contained in:
parent
516de905bd
commit
ead323eaed
5 changed files with 14 additions and 7 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue