Fix repairs

This commit is contained in:
Ben Sarmiento
2024-01-16 21:40:07 +01:00
parent 727c694c02
commit 5049320379
3 changed files with 9 additions and 22 deletions

View File

@@ -45,13 +45,13 @@ func (t *TorrentManager) RefreshTorrents() []string {
continue
}
torrentIDs := info.DownloadedIDs.ToSlice()
if !info.AnyInProgress() && len(torrentIDs) > 0 && t.forRepairs.Contains(info.DownloadedIDs.ToSlice()[0]) {
if !info.AnyInProgress() && len(torrentIDs) > 0 && t.onlyForRepair.Contains(info.DownloadedIDs.ToSlice()[0]) {
torrentID := info.DownloadedIDs.ToSlice()[0]
// if it's 100% and it's a temp repair, remove it
t.Api.DeleteTorrent(torrentID)
toReinsert.Add(t.GetKey(info))
infoChan <- nil
t.forRepairs.Remove(torrentID)
t.onlyForRepair.Remove(torrentID)
continue
}
if !info.AnyInProgress() {