Fixer fix
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user