Skip to content

Commit 5833f71

Browse files
committed
fix for linter
1 parent 3773e02 commit 5833f71

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/downloader/monitor.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ func (c *DownloadClient) MonitorDownloads(tracks []*models.Track, m Monitor) err
9898
delete(progressMap, key)
9999
track.File = file
100100
successDownloads += 1
101-
m.Cleanup(*track, fileStatus.ID)
101+
if err = m.Cleanup(*track, fileStatus.ID); err != nil {
102+
debug.Debug(err.Error())
103+
}
102104
continue
103105

104106
} else if fileStatus.BytesTransferred > tracker.LastBytesTransferred {
@@ -110,7 +112,9 @@ func (c *DownloadClient) MonitorDownloads(tracks []*models.Track, m Monitor) err
110112
} else if currentTime.Sub(tracker.LastUpdated) > monCfg.MonitorDuration || strings.Contains(fileStatus.State, "Errored") || strings.Contains(fileStatus.State, "Cancelled") {
111113
log.Printf("[%s/monitor] no progress on %s in %v, skipping track", monCfg.Service, track.File, monCfg.MonitorDuration)
112114
tracker.Skipped = true
113-
m.Cleanup(*track, fileStatus.ID)
115+
if err = m.Cleanup(*track, fileStatus.ID); err != nil {
116+
debug.Debug(err.Error())
117+
}
114118
continue
115119
}
116120
}

0 commit comments

Comments
 (0)