Do not reprocess unrepairable torrents

This commit is contained in:
Ben Sarmiento
2024-01-24 05:44:50 +01:00
parent 0956dd7537
commit 93f57de234

View File

@@ -46,6 +46,10 @@ func (t *TorrentManager) getUncachedTorrents() ([]*Torrent, error) {
var uncachedTorrents []*Torrent var uncachedTorrents []*Torrent
allTorrents.IterCb(func(_ string, torrent *Torrent) { allTorrents.IterCb(func(_ string, torrent *Torrent) {
if torrent.AnyInProgress() || torrent.UnrepairableReason != "" {
return
}
if _, ok := availabilityChecks[torrent.Hash]; !ok || !availabilityChecks[torrent.Hash] { if _, ok := availabilityChecks[torrent.Hash]; !ok || !availabilityChecks[torrent.Hash] {
uncachedTorrents = append(uncachedTorrents, torrent) uncachedTorrents = append(uncachedTorrents, torrent)
} }