New: Handle Freeleech flag at IndexerBase

This sets freeleech flag automatically for torrent releases with DownloadVolumeFactor = 0
This commit is contained in:
Qstick
2021-06-19 17:21:24 -04:00
parent 97b09335df
commit 61c1e934a5
4 changed files with 8 additions and 15 deletions
@@ -91,6 +91,12 @@ namespace NzbDrone.Core.Indexers
c.Indexer = Definition.Name;
c.DownloadProtocol = Protocol;
c.IndexerPriority = ((IndexerDefinition)Definition).Priority;
//Add common flags
if (Protocol == DownloadProtocol.Torrent && ((TorrentInfo)c).DownloadVolumeFactor == 0)
{
c.IndexerFlags.Add(IndexerFlag.FreeLeech);
}
});
return result;