Ensure exporters finish the progress

This commit is contained in:
Philipp Wolfer 2023-11-22 11:55:31 +01:00
parent 2e6319d296
commit d810fc9cac
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
4 changed files with 6 additions and 1 deletions

View file

@ -49,12 +49,14 @@ func (b *SubsonicApiBackend) ExportLoves(oldestTimestamp time.Time, results chan
defer close(progress)
err := b.client.Authenticate(b.password)
if err != nil {
progress <- models.Progress{}.Complete()
results <- models.LovesResult{Error: err}
return
}
starred, err := b.client.GetStarred2(map[string]string{})
if err != nil {
progress <- models.Progress{}.Complete()
results <- models.LovesResult{Error: err}
return
}