Allow repairing file from ok state

This commit is contained in:
Ben Sarmiento
2024-05-24 18:12:32 +02:00
parent 7695412b22
commit bb316a1bfd
2 changed files with 3 additions and 11 deletions

View File

@@ -257,9 +257,7 @@ func (t *TorrentManager) convertToTorrent(info *realdebrid.TorrentInfo) *Torrent
if strings.HasPrefix(file.Link, "https://real-debrid.com/d/") {
file.Link = file.Link[0:39]
}
if err := file.State.Event(context.Background(), "repair_file"); err != nil {
t.log.Errorf("Cannot repair file %s: %v", file.Path, err)
}
file.State.Event(context.Background(), "repair_file")
}
torrent.UnassignedLinks = mapset.NewSet[string]()
torrent.State.Event(context.Background(), "mark_as_repaired")