Return 1 seeder as fallback only in Torrent RSS Feed

pull/1872/head
Bogdan 1 year ago
parent 4a7cc82f0d
commit 9adbfd2391

@ -46,7 +46,8 @@ namespace NzbDrone.Core.Indexers.Definitions.TorrentRss
ParseSizeInDescription = parserSettings.ParseSizeInDescription,
SizeElementName = parserSettings.SizeElementName,
DefaultReleaseSize = indexerSettings.DefaultReleaseSize
DefaultReleaseSize = indexerSettings.DefaultReleaseSize,
DefaultReleaseSeeders = 1
};
}

@ -34,6 +34,9 @@ namespace NzbDrone.Core.Indexers
// Default size for when release sizes aren't available
public double? DefaultReleaseSize { get; set; }
// Default value for when release seeders aren't available
public int? DefaultReleaseSeeders { get; set; }
public TorrentRssParser()
{
PreferredEnclosureMimeTypes = TorrentEnclosureMimeTypes;
@ -145,8 +148,7 @@ namespace NzbDrone.Core.Indexers
return (int)seeds;
}
// Return 1 seeder as fallback
return 1;
return DefaultReleaseSeeders;
}
protected virtual int? GetPeers(XElement item)
@ -175,8 +177,7 @@ namespace NzbDrone.Core.Indexers
return int.Parse(itempeers.Value);
}
// Ensure returning 1 seeder as fallback
return 1;
return DefaultReleaseSeeders;
}
protected override long GetSize(XElement item)

Loading…
Cancel
Save