From 1eddf3a152fae04142263c02a3e3b317ff2feeb2 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Tue, 7 May 2024 00:21:50 +0300 Subject: [PATCH] Use number input for seed ratio --- src/NzbDrone.Core/Indexers/SeedCriteriaSettings.cs | 2 +- src/Sonarr.Http/ClientSchema/SchemaBuilder.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Indexers/SeedCriteriaSettings.cs b/src/NzbDrone.Core/Indexers/SeedCriteriaSettings.cs index af9fad86f..ff3d593fb 100644 --- a/src/NzbDrone.Core/Indexers/SeedCriteriaSettings.cs +++ b/src/NzbDrone.Core/Indexers/SeedCriteriaSettings.cs @@ -48,7 +48,7 @@ namespace NzbDrone.Core.Indexers 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; } [FieldDefinition(1, Type = FieldType.Number, Label = "IndexerSettingsSeedTime", Unit = "minutes", HelpText = "IndexerSettingsSeedTimeHelpText", Advanced = true)] diff --git a/src/Sonarr.Http/ClientSchema/SchemaBuilder.cs b/src/Sonarr.Http/ClientSchema/SchemaBuilder.cs index f6fc874f1..39e2965a4 100644 --- a/src/Sonarr.Http/ClientSchema/SchemaBuilder.cs +++ b/src/Sonarr.Http/ClientSchema/SchemaBuilder.cs @@ -162,7 +162,7 @@ namespace Sonarr.Http.ClientSchema 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; }