2016-03-25 00:56:29 +00:00
|
|
|
using NzbDrone.Core.Configuration;
|
2017-06-17 13:02:58 +00:00
|
|
|
using NzbDrone.Core.Parser;
|
2019-12-22 22:08:53 +00:00
|
|
|
using Radarr.Http.REST;
|
2014-02-16 09:56:12 +00:00
|
|
|
|
|
|
|
namespace NzbDrone.Api.Config
|
|
|
|
{
|
|
|
|
public class IndexerConfigResource : RestResource
|
|
|
|
{
|
2015-10-03 17:45:26 +00:00
|
|
|
public int MinimumAge { get; set; }
|
2018-03-26 07:03:43 +00:00
|
|
|
public int MaximumSize { get; set; }
|
2015-10-03 17:45:26 +00:00
|
|
|
public int Retention { get; set; }
|
|
|
|
public int RssSyncInterval { get; set; }
|
2017-04-17 15:12:09 +00:00
|
|
|
public bool PreferIndexerFlags { get; set; }
|
2019-12-22 21:24:10 +00:00
|
|
|
public int AvailabilityDelay { get; set; }
|
|
|
|
public bool AllowHardcodedSubs { get; set; }
|
|
|
|
public string WhitelistedHardcodedSubs { get; set; }
|
2017-06-17 13:02:58 +00:00
|
|
|
public ParsingLeniencyType ParsingLeniency { get; set; }
|
2014-02-16 09:56:12 +00:00
|
|
|
}
|
2016-03-25 00:56:29 +00:00
|
|
|
|
|
|
|
public static class IndexerConfigResourceMapper
|
|
|
|
{
|
|
|
|
public static IndexerConfigResource ToResource(IConfigService model)
|
|
|
|
{
|
|
|
|
return new IndexerConfigResource
|
|
|
|
{
|
|
|
|
MinimumAge = model.MinimumAge,
|
2018-03-26 07:03:43 +00:00
|
|
|
MaximumSize = model.MaximumSize,
|
2016-03-25 00:56:29 +00:00
|
|
|
Retention = model.Retention,
|
|
|
|
RssSyncInterval = model.RssSyncInterval,
|
2017-04-17 15:12:09 +00:00
|
|
|
PreferIndexerFlags = model.PreferIndexerFlags,
|
2019-12-22 21:24:10 +00:00
|
|
|
AvailabilityDelay = model.AvailabilityDelay,
|
|
|
|
AllowHardcodedSubs = model.AllowHardcodedSubs,
|
|
|
|
WhitelistedHardcodedSubs = model.WhitelistedHardcodedSubs,
|
2017-06-17 13:02:58 +00:00
|
|
|
ParsingLeniency = model.ParsingLeniency,
|
2016-03-25 00:56:29 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
2014-02-16 09:56:12 +00:00
|
|
|
}
|