From 93f57de23476db515c8e566aca34b71e30f616e9 Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Wed, 24 Jan 2024 05:44:50 +0100 Subject: [PATCH] Do not reprocess unrepairable torrents --- internal/torrent/uncached.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/torrent/uncached.go b/internal/torrent/uncached.go index 84e62d7..c2717ee 100644 --- a/internal/torrent/uncached.go +++ b/internal/torrent/uncached.go @@ -46,6 +46,10 @@ func (t *TorrentManager) getUncachedTorrents() ([]*Torrent, error) { var uncachedTorrents []*Torrent allTorrents.IterCb(func(_ string, torrent *Torrent) { + if torrent.AnyInProgress() || torrent.UnrepairableReason != "" { + return + } + if _, ok := availabilityChecks[torrent.Hash]; !ok || !availabilityChecks[torrent.Hash] { uncachedTorrents = append(uncachedTorrents, torrent) }