Fixed: (Redacted) Treat freeload torrents as neutral leech

Towards #1933
pull/1934/head
Bogdan 1 year ago
parent c107011659
commit 9c243c7e0d

@ -35,6 +35,7 @@ public class GazelleTorrent
public string Category { get; set; } public string Category { get; set; }
public bool IsFreeLeech { get; set; } public bool IsFreeLeech { get; set; }
public bool IsNeutralLeech { get; set; } public bool IsNeutralLeech { get; set; }
public bool IsFreeload { get; set; }
public bool IsPersonalFreeLeech { get; set; } public bool IsPersonalFreeLeech { get; set; }
public bool CanUseToken { get; set; } public bool CanUseToken { get; set; }
} }
@ -63,6 +64,7 @@ public class GazelleRelease
public List<GazelleTorrent> Torrents { get; set; } public List<GazelleTorrent> Torrents { get; set; }
public bool IsFreeLeech { get; set; } public bool IsFreeLeech { get; set; }
public bool IsNeutralLeech { get; set; } public bool IsNeutralLeech { get; set; }
public bool IsFreeload { get; set; }
public bool IsPersonalFreeLeech { get; set; } public bool IsPersonalFreeLeech { get; set; }
public bool CanUseToken { get; set; } public bool CanUseToken { get; set; }
} }

@ -265,8 +265,8 @@ namespace NzbDrone.Core.Indexers.Definitions
Scene = torrent.Scene, Scene = torrent.Scene,
Files = torrent.FileCount, Files = torrent.FileCount,
Grabs = torrent.Snatches, Grabs = torrent.Snatches,
DownloadVolumeFactor = torrent.IsFreeLeech || torrent.IsNeutralLeech || torrent.IsPersonalFreeLeech ? 0 : 1, DownloadVolumeFactor = torrent.IsFreeLeech || torrent.IsNeutralLeech || torrent.IsFreeload || torrent.IsPersonalFreeLeech ? 0 : 1,
UploadVolumeFactor = torrent.IsNeutralLeech ? 0 : 1 UploadVolumeFactor = torrent.IsNeutralLeech || torrent.IsFreeload ? 0 : 1
}; };
var category = torrent.Category; var category = torrent.Category;
@ -301,8 +301,8 @@ namespace NzbDrone.Core.Indexers.Definitions
PublishDate = DateTimeOffset.FromUnixTimeSeconds(ParseUtil.CoerceLong(result.GroupTime)).UtcDateTime, PublishDate = DateTimeOffset.FromUnixTimeSeconds(ParseUtil.CoerceLong(result.GroupTime)).UtcDateTime,
Files = result.FileCount, Files = result.FileCount,
Grabs = result.Snatches, Grabs = result.Snatches,
DownloadVolumeFactor = result.IsFreeLeech || result.IsNeutralLeech || result.IsPersonalFreeLeech ? 0 : 1, DownloadVolumeFactor = result.IsFreeLeech || result.IsNeutralLeech || result.IsFreeload || result.IsPersonalFreeLeech ? 0 : 1,
UploadVolumeFactor = result.IsNeutralLeech ? 0 : 1 UploadVolumeFactor = result.IsNeutralLeech || result.IsFreeload ? 0 : 1
}; };
var category = result.Category; var category = result.Category;

Loading…
Cancel
Save