mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-01-03 06:13:38 +01:00
Fixed: (PTP) Parse half leech
This commit is contained in:
parent
fbc3c09094
commit
c3aa377ed5
2 changed files with 10 additions and 1 deletions
|
|
@ -94,7 +94,12 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
ImdbId = result.ImdbId.IsNotNullOrWhiteSpace() ? int.Parse(result.ImdbId) : 0,
|
||||
Scene = torrent.Scene,
|
||||
IndexerFlags = flags,
|
||||
DownloadVolumeFactor = torrent.FreeleechType is "Freeleech" ? 0 : 1,
|
||||
DownloadVolumeFactor = torrent.FreeleechType?.ToUpperInvariant() switch
|
||||
{
|
||||
"FREELEECH" => 0,
|
||||
"HALF LEECH" => 0.5,
|
||||
_ => 1
|
||||
},
|
||||
UploadVolumeFactor = 1,
|
||||
MinimumRatio = 1,
|
||||
MinimumSeedTime = 345600,
|
||||
|
|
|
|||
|
|
@ -138,6 +138,10 @@ protected virtual IList<ReleaseInfo> CleanupReleases(IEnumerable<ReleaseInfo> re
|
|||
{
|
||||
torrentRelease.IndexerFlags.Add(IndexerFlag.FreeLeech);
|
||||
}
|
||||
else if (torrentRelease.DownloadVolumeFactor == 0.5)
|
||||
{
|
||||
torrentRelease.IndexerFlags.Add(IndexerFlag.HalfLeech);
|
||||
}
|
||||
|
||||
if (torrentRelease.UploadVolumeFactor == 0.0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue