From c690e9a50a0317bcff5e6cd206d30b5785a1918b Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 24 Nov 2023 22:31:00 +0200 Subject: [PATCH] New: Add NeutralLeech to indexer flags --- src/NzbDrone.Core/Indexers/IndexerBase.cs | 11 ++++++++++- src/NzbDrone.Core/Indexers/IndexerFlag.cs | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Indexers/IndexerBase.cs b/src/NzbDrone.Core/Indexers/IndexerBase.cs index 2e2e7cdd9..5f54dd620 100644 --- a/src/NzbDrone.Core/Indexers/IndexerBase.cs +++ b/src/NzbDrone.Core/Indexers/IndexerBase.cs @@ -134,11 +134,20 @@ namespace NzbDrone.Core.Indexers //Add common flags if (Protocol == DownloadProtocol.Torrent && c is TorrentInfo torrentRelease) { - if (torrentRelease.DownloadVolumeFactor == 0) + if (torrentRelease.DownloadVolumeFactor == 0.0) { torrentRelease.IndexerFlags.Add(IndexerFlag.FreeLeech); } + if (torrentRelease.UploadVolumeFactor == 0.0) + { + torrentRelease.IndexerFlags.Add(IndexerFlag.NeutralLeech); + } + else if (torrentRelease.UploadVolumeFactor == 2.0) + { + torrentRelease.IndexerFlags.Add(IndexerFlag.DoubleUpload); + } + if (torrentRelease.Scene.GetValueOrDefault(false)) { torrentRelease.IndexerFlags.Add(IndexerFlag.Scene); diff --git a/src/NzbDrone.Core/Indexers/IndexerFlag.cs b/src/NzbDrone.Core/Indexers/IndexerFlag.cs index 41092dfab..26a65e96c 100644 --- a/src/NzbDrone.Core/Indexers/IndexerFlag.cs +++ b/src/NzbDrone.Core/Indexers/IndexerFlag.cs @@ -63,7 +63,8 @@ namespace NzbDrone.Core.Indexers } public static IndexerFlag Internal => new ("internal", "Uploader is an internal release group"); - public static IndexerFlag FreeLeech => new ("freeleech", "Release doesn't count toward ratio"); + public static IndexerFlag FreeLeech => new ("freeleech", "Download doesn't count toward ratio"); + public static IndexerFlag NeutralLeech => new ("neutralleech", "Download and upload doesn't count toward ratio"); public static IndexerFlag HalfLeech => new ("halfleech", "Release counts 50% to ratio"); public static IndexerFlag Scene => new ("scene", "Uploader follows scene rules"); public static IndexerFlag DoubleUpload => new ("doubleupload", "Seeding counts double for release");