Much more stringent check

This commit is contained in:
Ben Sarmiento
2024-01-19 02:13:31 +01:00
parent 2c43cf9b12
commit c0b9fc8c55
3 changed files with 9 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ func (t *TorrentManager) RefreshTorrents() []string {
torrent, _ := t.onlyForRepair.Get(instances[idx].ID)
brokenFiles := getBrokenFiles(torrent)
info, err := t.redownloadTorrent(torrent, "")
if err == nil && info.Progress == 100 && !t.isStillBroken(info, brokenFiles) {
if err == nil && info.IsDone() && !t.isStillBroken(info, brokenFiles) {
t.Api.DeleteTorrent(instances[idx].ID)
t.onlyForRepair.Remove(instances[idx].ID)
}