mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-03 09:09:42 +02:00
Fixed: (PTP) Parse half leech
This commit is contained in:
@@ -94,7 +94,12 @@ namespace NzbDrone.Core.Indexers.Definitions.PassThePopcorn
|
|||||||
ImdbId = result.ImdbId.IsNotNullOrWhiteSpace() ? int.Parse(result.ImdbId) : 0,
|
ImdbId = result.ImdbId.IsNotNullOrWhiteSpace() ? int.Parse(result.ImdbId) : 0,
|
||||||
Scene = torrent.Scene,
|
Scene = torrent.Scene,
|
||||||
IndexerFlags = flags,
|
IndexerFlags = flags,
|
||||||
DownloadVolumeFactor = torrent.FreeleechType is "Freeleech" ? 0 : 1,
|
DownloadVolumeFactor = torrent.FreeleechType?.ToUpperInvariant() switch
|
||||||
|
{
|
||||||
|
"FREELEECH" => 0,
|
||||||
|
"HALF LEECH" => 0.5,
|
||||||
|
_ => 1
|
||||||
|
},
|
||||||
UploadVolumeFactor = 1,
|
UploadVolumeFactor = 1,
|
||||||
MinimumRatio = 1,
|
MinimumRatio = 1,
|
||||||
MinimumSeedTime = 345600,
|
MinimumSeedTime = 345600,
|
||||||
|
@@ -138,6 +138,10 @@ namespace NzbDrone.Core.Indexers
|
|||||||
{
|
{
|
||||||
torrentRelease.IndexerFlags.Add(IndexerFlag.FreeLeech);
|
torrentRelease.IndexerFlags.Add(IndexerFlag.FreeLeech);
|
||||||
}
|
}
|
||||||
|
else if (torrentRelease.DownloadVolumeFactor == 0.5)
|
||||||
|
{
|
||||||
|
torrentRelease.IndexerFlags.Add(IndexerFlag.HalfLeech);
|
||||||
|
}
|
||||||
|
|
||||||
if (torrentRelease.UploadVolumeFactor == 0.0)
|
if (torrentRelease.UploadVolumeFactor == 0.0)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user