mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-06 16:43:25 +01:00
Fixed: Allow decimals for Seed Ratio
This commit is contained in:
parent
68b895d2ad
commit
dd21d9b521
4 changed files with 4 additions and 2 deletions
|
|
@ -256,6 +256,7 @@ FormInputGroup.propTypes = {
|
|||
name: PropTypes.string.isRequired,
|
||||
value: PropTypes.any,
|
||||
values: PropTypes.arrayOf(PropTypes.any),
|
||||
isFloat: PropTypes.bool,
|
||||
type: PropTypes.string.isRequired,
|
||||
kind: PropTypes.oneOf(kinds.all),
|
||||
min: PropTypes.number,
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ function EditIndexerModalContent(props: EditIndexerModalContentProps) {
|
|||
name="seedRatio"
|
||||
value={seedRatio}
|
||||
helpText={translate('SeedRatioHelpText')}
|
||||
isFloat={true}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class IndexerTorrentBaseSettings
|
|||
[FieldDefinition(1, Type = FieldType.Number, Label = "IndexerSettingsAppsMinimumSeeders", HelpText = "IndexerSettingsAppsMinimumSeedersHelpText", Advanced = true)]
|
||||
public int? AppMinimumSeeders { get; set; }
|
||||
|
||||
[FieldDefinition(2, Type = FieldType.Textbox, Label = "IndexerSettingsSeedRatio", HelpText = "IndexerSettingsSeedRatioHelpText")]
|
||||
[FieldDefinition(2, Type = FieldType.Number, Label = "IndexerSettingsSeedRatio", HelpText = "IndexerSettingsSeedRatioHelpText")]
|
||||
public double? SeedRatio { get; set; }
|
||||
|
||||
[FieldDefinition(3, Type = FieldType.Number, Label = "IndexerSettingsSeedTime", Unit = "minutes", HelpText = "IndexerSettingsSeedTimeHelpText", Advanced = true)]
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ private static FieldMapping[] GetFieldMapping(Type type, string prefix, Func<obj
|
|||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue