mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 13:47:05 +02:00
Improved progress report for Spotify loves
This commit is contained in:
parent
0e3061e837
commit
4a9f26d9db
3 changed files with 17 additions and 4 deletions
|
@ -36,7 +36,11 @@ func ProcessListensImports(importer models.ListensImport, results chan models.Li
|
|||
return
|
||||
}
|
||||
|
||||
result.TotalCount += len(exportResult.Listens)
|
||||
if exportResult.Total > 0 {
|
||||
result.TotalCount = exportResult.Total
|
||||
} else {
|
||||
result.TotalCount += len(exportResult.Listens)
|
||||
}
|
||||
importResult, err := importer.ImportListens(exportResult, result, progress)
|
||||
if err != nil {
|
||||
handleError(importResult, err, out, progress)
|
||||
|
@ -74,7 +78,11 @@ func ProcessLovesImports(importer models.LovesImport, results chan models.LovesR
|
|||
return
|
||||
}
|
||||
|
||||
result.TotalCount += len(exportResult.Loves)
|
||||
if exportResult.Total > 0 {
|
||||
result.TotalCount = exportResult.Total
|
||||
} else {
|
||||
result.TotalCount += len(exportResult.Loves)
|
||||
}
|
||||
importResult, err := importer.ImportLoves(exportResult, result, progress)
|
||||
if err != nil {
|
||||
handleError(importResult, err, out, progress)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue