mirror of
https://git.sr.ht/~phw/scotty
synced 2025-05-11 18:47:04 +02:00
Show progress bars as aborted on export / import error
This commit is contained in:
parent
15d939e150
commit
aae5123c3d
12 changed files with 35 additions and 21 deletions
|
@ -108,7 +108,7 @@ out:
|
|||
result, err := b.client.User.GetRecentTracks(args)
|
||||
if err != nil {
|
||||
results <- models.ListensResult{Error: err}
|
||||
progress <- p.Complete()
|
||||
progress <- p.Abort()
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ out:
|
|||
timestamp, err := strconv.ParseInt(scrobble.Date.Uts, 10, 64)
|
||||
if err != nil {
|
||||
results <- models.ListensResult{Error: err}
|
||||
progress <- p.Complete()
|
||||
progress <- p.Abort()
|
||||
break out
|
||||
}
|
||||
if timestamp > oldestTimestamp.Unix() {
|
||||
|
@ -268,7 +268,7 @@ out:
|
|||
"page": page,
|
||||
})
|
||||
if err != nil {
|
||||
progress <- p.Complete()
|
||||
progress <- p.Abort()
|
||||
results <- models.LovesResult{Error: err}
|
||||
return
|
||||
}
|
||||
|
@ -282,7 +282,7 @@ out:
|
|||
for _, track := range result.Tracks {
|
||||
timestamp, err := strconv.ParseInt(track.Date.Uts, 10, 64)
|
||||
if err != nil {
|
||||
progress <- p.Complete()
|
||||
progress <- p.Abort()
|
||||
results <- models.LovesResult{Error: err}
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue