Show progress bars as aborted on export / import error

This commit is contained in:
Philipp Wolfer 2025-05-04 12:59:40 +02:00
parent 15d939e150
commit aae5123c3d
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
12 changed files with 35 additions and 21 deletions

View file

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