Full selection is broken, dont redownload it
This commit is contained in:
@@ -3,7 +3,6 @@ package torrent
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/debridmediamanager/zurg/pkg/realdebrid"
|
||||
cmap "github.com/orcaman/concurrent-map/v2"
|
||||
@@ -59,30 +58,28 @@ func (t *TorrentManager) processFixers(instances []realdebrid.Torrent) {
|
||||
}
|
||||
|
||||
// a new case: repaired_with:<id>
|
||||
if strings.HasPrefix(command, "repaired_with:") {
|
||||
if instance.Progress != 100 {
|
||||
t.fixers.Set(id, command) // requeue the fixer
|
||||
continue
|
||||
}
|
||||
|
||||
otherId := strings.TrimPrefix(command, "repaired_with:")
|
||||
for _, instance2 := range instances {
|
||||
if instance2.ID == otherId {
|
||||
if instance2.Progress != 100 {
|
||||
t.fixers.Set(id, command) // requeue the fixer
|
||||
break
|
||||
}
|
||||
torrent := t.getMoreInfo(instance2)
|
||||
t.log.Debugf("Repairing torrent %s again now that fixers ids=%s and %s are done", t.GetKey(torrent), id, otherId)
|
||||
repairMe, _ := allTorrents.Get(t.GetKey(torrent))
|
||||
toRedownload = append(toRedownload, repairMe)
|
||||
toDelete = append(toDelete, id, otherId)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
continue
|
||||
}
|
||||
// if strings.HasPrefix(command, "repaired_with:") {
|
||||
// if instance.Progress != 100 {
|
||||
// t.fixers.Set(id, command) // requeue the fixer
|
||||
// continue
|
||||
// }
|
||||
// otherId := strings.TrimPrefix(command, "repaired_with:")
|
||||
// for _, instance2 := range instances {
|
||||
// if instance2.ID == otherId {
|
||||
// if instance2.Progress != 100 {
|
||||
// t.fixers.Set(id, command) // requeue the fixer
|
||||
// break
|
||||
// }
|
||||
// torrent := t.getMoreInfo(instance2)
|
||||
// t.log.Debugf("Repairing torrent %s again now that fixers ids=%s and %s are done", t.GetKey(torrent), id, otherId)
|
||||
// repairMe, _ := allTorrents.Get(t.GetKey(torrent))
|
||||
// toRedownload = append(toRedownload, repairMe)
|
||||
// toDelete = append(toDelete, id, otherId)
|
||||
// break
|
||||
// }
|
||||
// }
|
||||
// continue
|
||||
// }
|
||||
}
|
||||
|
||||
infoCache, _ := t.DirectoryMap.Get(INT_INFO_CACHE)
|
||||
|
||||
Reference in New Issue
Block a user