mirror of
https://github.com/fergalmoran/Readarr.git
synced 2025-12-22 09:29:59 +00:00
Use number input for seed ratio
(cherry picked from commit 1eddf3a152fae04142263c02a3e3b317ff2feeb2) Plus translations Closes #3470
This commit is contained in:
@@ -48,10 +48,10 @@ namespace NzbDrone.Core.Indexers
|
|||||||
|
|
||||||
public class SeedCriteriaSettings
|
public class SeedCriteriaSettings
|
||||||
{
|
{
|
||||||
[FieldDefinition(0, Type = FieldType.Textbox, Label = "Seed Ratio", HelpText = "The ratio a torrent should reach before stopping, empty is download client's default. Ratio should be at least 1.0 and follow the indexers rules")]
|
[FieldDefinition(0, Type = FieldType.Number, Label = "IndexerSettingsSeedRatio", HelpText = "IndexerSettingsSeedRatioHelpText")]
|
||||||
public double? SeedRatio { get; set; }
|
public double? SeedRatio { get; set; }
|
||||||
|
|
||||||
[FieldDefinition(1, Type = FieldType.Textbox, Label = "Seed Time", Unit = "minutes", HelpText = "The time a torrent should be seeded before stopping, empty is download client's default", Advanced = true)]
|
[FieldDefinition(1, Type = FieldType.Number, Label = "IndexerSettingsSeedTime", Unit = "minutes", HelpText = "IndexerSettingsSeedTimeHelpText", Advanced = true)]
|
||||||
public int? SeedTime { get; set; }
|
public int? SeedTime { get; set; }
|
||||||
|
|
||||||
[FieldDefinition(2, Type = FieldType.Textbox, Label = "Discography Seed Time", Unit = "minutes", HelpText = "The time a torrent should be seeded before stopping, empty is download client's default", Advanced = true)]
|
[FieldDefinition(2, Type = FieldType.Textbox, Label = "Discography Seed Time", Unit = "minutes", HelpText = "The time a torrent should be seeded before stopping, empty is download client's default", Advanced = true)]
|
||||||
|
|||||||
@@ -456,6 +456,10 @@
|
|||||||
"IndexerSearchCheckNoAvailableIndexersMessage": "All search-capable indexers are temporarily unavailable due to recent indexer errors",
|
"IndexerSearchCheckNoAvailableIndexersMessage": "All search-capable indexers are temporarily unavailable due to recent indexer errors",
|
||||||
"IndexerSearchCheckNoInteractiveMessage": "No indexers available with Interactive Search enabled, Readarr will not provide any interactive search results",
|
"IndexerSearchCheckNoInteractiveMessage": "No indexers available with Interactive Search enabled, Readarr will not provide any interactive search results",
|
||||||
"IndexerSettings": "Indexer Settings",
|
"IndexerSettings": "Indexer Settings",
|
||||||
|
"IndexerSettingsSeedRatio": "Seed Ratio",
|
||||||
|
"IndexerSettingsSeedRatioHelpText": "The ratio a torrent should reach before stopping, empty uses the download client's default. Ratio should be at least 1.0 and follow the indexers rules",
|
||||||
|
"IndexerSettingsSeedTime": "Seed Time",
|
||||||
|
"IndexerSettingsSeedTimeHelpText": "The time a torrent should be seeded before stopping, empty uses the download client's default",
|
||||||
"IndexerStatusCheckAllClientMessage": "All indexers are unavailable due to failures",
|
"IndexerStatusCheckAllClientMessage": "All indexers are unavailable due to failures",
|
||||||
"IndexerStatusCheckSingleClientMessage": "Indexers unavailable due to failures: {0}",
|
"IndexerStatusCheckSingleClientMessage": "Indexers unavailable due to failures: {0}",
|
||||||
"IndexerTagsHelpText": "Only use this indexer for authors with at least one matching tag. Leave blank to use with all authors.",
|
"IndexerTagsHelpText": "Only use this indexer for authors with at least one matching tag. Leave blank to use with all authors.",
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ namespace Readarr.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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user