mirror of
https://git.sr.ht/~phw/scotty
synced 2025-05-08 01:17:04 +02:00
Avoid double closing of export progress channel
This commit is contained in:
parent
e8fdfb95a6
commit
fb285930c0
9 changed files with 2 additions and 11 deletions
|
@ -51,7 +51,6 @@ func (b *ListenBrainzApiBackend) ExportListens(oldestTimestamp time.Time, result
|
|||
totalDuration := startTime.Sub(oldestTimestamp)
|
||||
|
||||
defer close(results)
|
||||
defer close(progress)
|
||||
|
||||
// FIXME: Optimize by fetching the listens in reverse listen time order
|
||||
listens := make(models.ListensList, 0, 2*MaxItemsPerGet)
|
||||
|
@ -140,7 +139,6 @@ func (b *ListenBrainzApiBackend) ImportListens(export models.ListensResult, impo
|
|||
func (b *ListenBrainzApiBackend) ExportLoves(oldestTimestamp time.Time, results chan models.LovesResult, progress chan models.Progress) {
|
||||
offset := 0
|
||||
defer close(results)
|
||||
defer close(progress)
|
||||
loves := make(models.LovesList, 0, 2*MaxItemsPerGet)
|
||||
p := models.Progress{}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue