Move scene flag to TorrentInfo and return tag in response

This commit is contained in:
Bogdan
2023-09-03 11:13:56 +03:00
parent 09606af351
commit 07b98f4137
12 changed files with 29 additions and 30 deletions
+9 -4
View File
@@ -131,12 +131,17 @@ namespace NzbDrone.Core.Indexers
c.IndexerPrivacy = ((IndexerDefinition)Definition).Privacy;
c.IndexerPriority = ((IndexerDefinition)Definition).Priority;
if (Protocol == DownloadProtocol.Torrent)
//Add common flags
if (Protocol == DownloadProtocol.Torrent && c is TorrentInfo torrentRelease)
{
//Add common flags
if (((TorrentInfo)c).DownloadVolumeFactor == 0)
if (torrentRelease.DownloadVolumeFactor == 0)
{
((TorrentInfo)c).IndexerFlags.Add(IndexerFlag.FreeLeech);
torrentRelease.IndexerFlags.Add(IndexerFlag.FreeLeech);
}
if (torrentRelease.Scene.GetValueOrDefault(false))
{
torrentRelease.IndexerFlags.Add(IndexerFlag.Scene);
}
}
});