Use number input for seed ratio

This commit is contained in:
Bogdan 2024-05-07 00:21:50 +03:00 committed by Mark McDowall
parent 8360dd7a7b
commit 1eddf3a152
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ namespace NzbDrone.Core.Indexers
public class SeedCriteriaSettings public class SeedCriteriaSettings
{ {
[FieldDefinition(0, Type = FieldType.Textbox, Label = "IndexerSettingsSeedRatio", HelpText = "IndexerSettingsSeedRatioHelpText")] [FieldDefinition(0, Type = FieldType.Number, Label = "IndexerSettingsSeedRatio", HelpText = "IndexerSettingsSeedRatioHelpText")]
public double? SeedRatio { get; set; } public double? SeedRatio { get; set; }
[FieldDefinition(1, Type = FieldType.Number, Label = "IndexerSettingsSeedTime", Unit = "minutes", HelpText = "IndexerSettingsSeedTimeHelpText", Advanced = true)] [FieldDefinition(1, Type = FieldType.Number, Label = "IndexerSettingsSeedTime", Unit = "minutes", HelpText = "IndexerSettingsSeedTimeHelpText", Advanced = true)]

View File

@ -162,7 +162,7 @@ namespace Sonarr.Http.ClientSchema
field.Hidden = fieldAttribute.Hidden.ToString().FirstCharToLower(); field.Hidden = fieldAttribute.Hidden.ToString().FirstCharToLower();
} }
if (fieldAttribute.Type is FieldType.Number && propertyInfo.PropertyType == typeof(double)) if (fieldAttribute.Type is FieldType.Number && (propertyInfo.PropertyType == typeof(double) || propertyInfo.PropertyType == typeof(double?)))
{ {
field.IsFloat = true; field.IsFloat = true;
} }