mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-23 22:45:06 -04:00
New: Rewrite Indexer Flags Implementation
This commit is contained in:
@@ -173,9 +173,9 @@ namespace NzbDrone.Core.Indexers.Torznab
|
||||
return base.GetPeers(item);
|
||||
}
|
||||
|
||||
protected IndexerFlags GetFlags(XElement item)
|
||||
protected List<IndexerFlag> GetFlags(XElement item)
|
||||
{
|
||||
IndexerFlags flags = 0;
|
||||
var flags = new List<IndexerFlag>();
|
||||
|
||||
var downloadFactor = TryGetFloatTorznabAttribute(item, "downloadvolumefactor", 1);
|
||||
|
||||
@@ -183,17 +183,17 @@ namespace NzbDrone.Core.Indexers.Torznab
|
||||
|
||||
if (uploadFactor == 2)
|
||||
{
|
||||
flags |= IndexerFlags.G_DoubleUpload;
|
||||
flags.Add(IndexerFlag.DoubleUpload);
|
||||
}
|
||||
|
||||
if (downloadFactor == 0.5)
|
||||
{
|
||||
flags |= IndexerFlags.G_Halfleech;
|
||||
flags.Add(IndexerFlag.HalfLeech);
|
||||
}
|
||||
|
||||
if (downloadFactor == 0.0)
|
||||
{
|
||||
flags |= IndexerFlags.G_Freeleech;
|
||||
flags.Add(IndexerFlag.FreeLeech);
|
||||
}
|
||||
|
||||
return flags;
|
||||
|
||||
Reference in New Issue
Block a user