Radarr/src/Radarr.Api.V3/Config/IndexerConfigResource.cs

36 lines
1.2 KiB
C#
Raw Normal View History

2018-11-23 07:03:32 +00:00
using NzbDrone.Core.Configuration;
2019-12-22 22:08:53 +00:00
using Radarr.Http.REST;
2018-11-23 07:03:32 +00:00
namespace Radarr.Api.V3.Config
2018-11-23 07:03:32 +00:00
{
public class IndexerConfigResource : RestResource
{
public int MinimumAge { get; set; }
public int MaximumSize { get; set; }
public int Retention { get; set; }
public int RssSyncInterval { get; set; }
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; }
2018-11-23 07:03:32 +00:00
}
public static class IndexerConfigResourceMapper
{
public static IndexerConfigResource ToResource(IConfigService model)
{
return new IndexerConfigResource
{
MinimumAge = model.MinimumAge,
MaximumSize = model.MaximumSize,
Retention = model.Retention,
RssSyncInterval = model.RssSyncInterval,
PreferIndexerFlags = model.PreferIndexerFlags,
2019-12-22 21:24:10 +00:00
AvailabilityDelay = model.AvailabilityDelay,
AllowHardcodedSubs = model.AllowHardcodedSubs,
WhitelistedHardcodedSubs = model.WhitelistedHardcodedSubs,
2018-11-23 07:03:32 +00:00
};
}
}
}