From a77d43bd439d807342e2855506eefed150b4d71e Mon Sep 17 00:00:00 2001 From: ta264 Date: Wed, 1 Jul 2020 21:05:49 +0100 Subject: [PATCH] Fixed: size CF conditions are now exclusive on min, inclusive on max --- .../CustomFormats/Specifications/SizeSpecification.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/CustomFormats/Specifications/SizeSpecification.cs b/src/NzbDrone.Core/CustomFormats/Specifications/SizeSpecification.cs index acf56f17e..532087b6c 100644 --- a/src/NzbDrone.Core/CustomFormats/Specifications/SizeSpecification.cs +++ b/src/NzbDrone.Core/CustomFormats/Specifications/SizeSpecification.cs @@ -10,17 +10,17 @@ namespace NzbDrone.Core.CustomFormats public override int Order => 8; public override string ImplementationName => "Size"; - [FieldDefinition(1, Label = "Minimum Size", Unit = "GB", Type = FieldType.Number)] + [FieldDefinition(1, Label = "Minimum Size", HelpText = "Release must be greater than this size", Unit = "GB", Type = FieldType.Number)] public double Min { get; set; } - [FieldDefinition(1, Label = "Maximum Size", Unit = "GB", Type = FieldType.Number)] + [FieldDefinition(1, Label = "Maximum Size", HelpText = "Release must be less than or equal to this size", Unit = "GB", Type = FieldType.Number)] public double Max { get; set; } protected override bool IsSatisfiedByWithoutNegate(ParsedMovieInfo movieInfo) { var size = (movieInfo?.ExtraInfo?.GetValueOrDefault("Size", 0.0) as long?) ?? 0; - return size > Min.Gigabytes() && size < Max.Gigabytes(); + return size > Min.Gigabytes() && size <= Max.Gigabytes(); } } }