Small tweak to repair
This commit is contained in:
@@ -28,15 +28,15 @@ func (t *TorrentManager) handleFixers() {
|
||||
if !t.fixers.Has(id) || torrent.AnyInProgress() {
|
||||
return
|
||||
}
|
||||
command, _ := t.fixers.Pop(id)
|
||||
command, _ := t.fixers.Pop(id) // delete the fixer if it's done
|
||||
switch command {
|
||||
case "delete_replaced":
|
||||
case "replaced": // id is old torrent id
|
||||
t.log.Debugf("Deleting old id=%s because it's redundant to fixed %s ", id, t.GetKey(torrent))
|
||||
toDelete = append(toDelete, id)
|
||||
case "delete_failed":
|
||||
case "download_failed": // id is failed fixer id
|
||||
t.log.Debugf("Deleting failed fixer id=%s of torrent %s", id, t.GetKey(torrent))
|
||||
toDelete = append(toDelete, id)
|
||||
case "repair":
|
||||
case "repaired": // id is fixer id
|
||||
t.log.Debugf("Repairing torrent %s again now that fixer id=%s is done", t.GetKey(torrent), id)
|
||||
toDelete = append(toDelete, id)
|
||||
repairMe, _ := allTorrents.Get(t.GetKey(torrent))
|
||||
@@ -48,6 +48,8 @@ func (t *TorrentManager) handleFixers() {
|
||||
infoCache.Remove(id)
|
||||
t.deleteTorrentFile(id)
|
||||
}
|
||||
t.writeFixersToFile()
|
||||
t.log.Debugf("Finished handling fixers")
|
||||
}
|
||||
|
||||
func (t *TorrentManager) writeFixersToFile() {
|
||||
|
||||
Reference in New Issue
Block a user