Fixed: (PTP) Filtering non-freeleech releases when using Freeleech Only

Co-authored-by: Bogdan <mynameisbogdan@users.noreply.github.com>
pull/2328/head
bakerboy448 3 weeks ago committed by GitHub
parent 37610eec40
commit 6d2d49f7bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -56,6 +56,19 @@ namespace NzbDrone.Core.Indexers.Definitions.PassThePopcorn
{
foreach (var torrent in result.Torrents)
{
// skip non-freeleech results when freeleech only is set
var downloadVolumeFactor = torrent.FreeleechType?.ToUpperInvariant() switch
{
"FREELEECH" => 0,
"HALF LEECH" => 0.5,
_ => 1
};
if (_settings.FreeleechOnly && downloadVolumeFactor != 0.0)
{
continue;
}
var id = torrent.Id;
var title = torrent.ReleaseName;
@ -94,12 +107,7 @@ namespace NzbDrone.Core.Indexers.Definitions.PassThePopcorn
ImdbId = result.ImdbId.IsNotNullOrWhiteSpace() ? int.Parse(result.ImdbId) : 0,
Scene = torrent.Scene,
IndexerFlags = flags,
DownloadVolumeFactor = torrent.FreeleechType?.ToUpperInvariant() switch
{
"FREELEECH" => 0,
"HALF LEECH" => 0.5,
_ => 1
},
DownloadVolumeFactor = downloadVolumeFactor,
UploadVolumeFactor = 1,
MinimumRatio = 1,
MinimumSeedTime = 345600,

Loading…
Cancel
Save