Close export results channel in generic implementation

This removes the need for every implementation to handle this case.
This commit is contained in:
Philipp Wolfer 2025-05-02 08:43:30 +02:00
parent 9480c69cbb
commit 1c3364dad5
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
11 changed files with 5 additions and 32 deletions

View file

@ -132,7 +132,6 @@ func (b *ScrobblerLogBackend) FinishImport() error {
}
func (b *ScrobblerLogBackend) ExportListens(oldestTimestamp time.Time, results chan models.ListensResult, progress chan models.Progress) {
defer close(results)
file, err := os.Open(b.filePath)
if err != nil {
progress <- models.Progress{}.Complete()