1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-09 12:32:31 +01:00

Fixed: Broken SeedConfigOptions due to System.Text.Json req. for public setters

This commit is contained in:
Qstick 2020-01-06 22:02:41 -05:00
parent 7ad2e7fbdb
commit 68ea6fbb4f
10 changed files with 12 additions and 10 deletions

View File

@ -44,7 +44,7 @@ public AwesomeHDSettings()
public IEnumerable<int> RequiredFlags { get; set; } public IEnumerable<int> RequiredFlags { get; set; }
[FieldDefinition(5)] [FieldDefinition(5)]
public SeedCriteriaSettings SeedCriteria { get; } = new SeedCriteriaSettings(); public SeedCriteriaSettings SeedCriteria { get; set; } = new SeedCriteriaSettings();
public NzbDroneValidationResult Validate() public NzbDroneValidationResult Validate()
{ {

View File

@ -60,7 +60,7 @@ public HDBitsSettings()
public IEnumerable<int> RequiredFlags { get; set; } public IEnumerable<int> RequiredFlags { get; set; }
[FieldDefinition(9)] [FieldDefinition(9)]
public SeedCriteriaSettings SeedCriteria { get; } = new SeedCriteriaSettings(); public SeedCriteriaSettings SeedCriteria { get; set; } = new SeedCriteriaSettings();
public NzbDroneValidationResult Validate() public NzbDroneValidationResult Validate()
{ {

View File

@ -48,7 +48,7 @@ public IPTorrentsSettings()
public IEnumerable<int> RequiredFlags { get; set; } public IEnumerable<int> RequiredFlags { get; set; }
[FieldDefinition(4)] [FieldDefinition(4)]
public SeedCriteriaSettings SeedCriteria { get; } = new SeedCriteriaSettings(); public SeedCriteriaSettings SeedCriteria { get; set; } = new SeedCriteriaSettings();
public NzbDroneValidationResult Validate() public NzbDroneValidationResult Validate()
{ {

View File

@ -6,6 +6,8 @@ public interface ITorrentIndexerSettings : IIndexerSettings
{ {
int MinimumSeeders { get; set; } int MinimumSeeders { get; set; }
IEnumerable<int> RequiredFlags { get; set; } IEnumerable<int> RequiredFlags { get; set; }
SeedCriteriaSettings SeedCriteria { get; }
// TODO: System.Text.Json requires setter be public for sub-object deserialization in 3.0. https://github.com/dotnet/corefx/issues/42515
SeedCriteriaSettings SeedCriteria { get; set; }
} }
} }

View File

@ -46,7 +46,7 @@ public NyaaSettings()
public IEnumerable<int> RequiredFlags { get; set; } public IEnumerable<int> RequiredFlags { get; set; }
[FieldDefinition(5)] [FieldDefinition(5)]
public SeedCriteriaSettings SeedCriteria { get; } = new SeedCriteriaSettings(); public SeedCriteriaSettings SeedCriteria { get; set; } = new SeedCriteriaSettings();
public NzbDroneValidationResult Validate() public NzbDroneValidationResult Validate()
{ {

View File

@ -45,7 +45,7 @@ public PassThePopcornSettings()
public int MinimumSeeders { get; set; } public int MinimumSeeders { get; set; }
[FieldDefinition(5)] [FieldDefinition(5)]
public SeedCriteriaSettings SeedCriteria { get; } = new SeedCriteriaSettings(); public SeedCriteriaSettings SeedCriteria { get; set; } = new SeedCriteriaSettings();
// [FieldDefinition(6, Type = FieldType.Tag, SelectOptions = typeof(IndexerFlags), Label = "Required Flags", HelpText = "What indexer flags are required?", HelpLink = "https://github.com/Radarr/Radarr/wiki/Indexer-Flags#1-required-flags", Advanced = true)] // [FieldDefinition(6, Type = FieldType.Tag, SelectOptions = typeof(IndexerFlags), Label = "Required Flags", HelpText = "What indexer flags are required?", HelpLink = "https://github.com/Radarr/Radarr/wiki/Indexer-Flags#1-required-flags", Advanced = true)]
public IEnumerable<int> RequiredFlags { get; set; } public IEnumerable<int> RequiredFlags { get; set; }

View File

@ -53,7 +53,7 @@ public RarbgSettings()
public IEnumerable<int> Categories { get; set; } public IEnumerable<int> Categories { get; set; }
[FieldDefinition(7)] [FieldDefinition(7)]
public SeedCriteriaSettings SeedCriteria { get; } = new SeedCriteriaSettings(); public SeedCriteriaSettings SeedCriteria { get; set; } = new SeedCriteriaSettings();
public NzbDroneValidationResult Validate() public NzbDroneValidationResult Validate()
{ {

View File

@ -43,7 +43,7 @@ public TorrentPotatoSettings()
public int MinimumSeeders { get; set; } public int MinimumSeeders { get; set; }
[FieldDefinition(5)] [FieldDefinition(5)]
public SeedCriteriaSettings SeedCriteria { get; } = new SeedCriteriaSettings(); public SeedCriteriaSettings SeedCriteria { get; set; } = new SeedCriteriaSettings();
// [FieldDefinition(6, Type = FieldType.Tag, SelectOptions = typeof(IndexerFlags), Label = "Required Flags", HelpText = "What indexer flags are required?", Advanced = true)] // [FieldDefinition(6, Type = FieldType.Tag, SelectOptions = typeof(IndexerFlags), Label = "Required Flags", HelpText = "What indexer flags are required?", Advanced = true)]
public IEnumerable<int> RequiredFlags { get; set; } public IEnumerable<int> RequiredFlags { get; set; }

View File

@ -44,7 +44,7 @@ public TorrentRssIndexerSettings()
public int MinimumSeeders { get; set; } public int MinimumSeeders { get; set; }
[FieldDefinition(5)] [FieldDefinition(5)]
public SeedCriteriaSettings SeedCriteria { get; } = new SeedCriteriaSettings(); public SeedCriteriaSettings SeedCriteria { get; set; } = new SeedCriteriaSettings();
// [FieldDefinition(6, Type = FieldType.Tag, SelectOptions = typeof(IndexerFlags), Label = "Required Flags", HelpText = "What indexer flags are required?", HelpLink = "https://github.com/Radarr/Radarr/wiki/Indexer-Flags#1-required-flags", Advanced = true)] // [FieldDefinition(6, Type = FieldType.Tag, SelectOptions = typeof(IndexerFlags), Label = "Required Flags", HelpText = "What indexer flags are required?", HelpLink = "https://github.com/Radarr/Radarr/wiki/Indexer-Flags#1-required-flags", Advanced = true)]
public IEnumerable<int> RequiredFlags { get; set; } public IEnumerable<int> RequiredFlags { get; set; }

View File

@ -62,7 +62,7 @@ public TorznabSettings()
public int MinimumSeeders { get; set; } public int MinimumSeeders { get; set; }
[FieldDefinition(9)] [FieldDefinition(9)]
public SeedCriteriaSettings SeedCriteria { get; } = new SeedCriteriaSettings(); public SeedCriteriaSettings SeedCriteria { get; set; } = new SeedCriteriaSettings();
// [FieldDefinition(10, Type = FieldType.Tag, SelectOptions = typeof(IndexerFlags), Label = "Required Flags", HelpText = "What indexer flags are required?", HelpLink = "https://github.com/Radarr/Radarr/wiki/Indexer-Flags#1-required-flags", Advanced = true)] // [FieldDefinition(10, Type = FieldType.Tag, SelectOptions = typeof(IndexerFlags), Label = "Required Flags", HelpText = "What indexer flags are required?", HelpLink = "https://github.com/Radarr/Radarr/wiki/Indexer-Flags#1-required-flags", Advanced = true)]
public IEnumerable<int> RequiredFlags { get; set; } public IEnumerable<int> RequiredFlags { get; set; }