diff --git a/internal/torrent/fixer.go b/internal/torrent/fixer.go index b300487..e9f8372 100644 --- a/internal/torrent/fixer.go +++ b/internal/torrent/fixer.go @@ -22,13 +22,14 @@ func (t *TorrentManager) fixerAddCommand(trigger, command string) { } func (t *TorrentManager) handleFixers(instances []realdebrid.Torrent) { + t.log.Debugf("Handling fixers - %d left", t.fixers.Count()) var toDelete []string var toRedownload []*Torrent allTorrents, _ := t.DirectoryMap.Get(INT_ALL) for _, instance := range instances { id := instance.ID if !t.fixers.Has(id) { - return + continue } command, _ := t.fixers.Pop(id) // delete the fixer if it's done switch command { @@ -40,7 +41,7 @@ func (t *TorrentManager) handleFixers(instances []realdebrid.Torrent) { toDelete = append(toDelete, id) case "repaired": // this torrent contains broken files if instance.Progress != 100 { - return + continue } torrent := t.getMoreInfo(instance) t.log.Debugf("Repairing torrent %s again now that fixer id=%s is done", t.GetKey(torrent), id)