2020-01-03 12:49:24 +00:00
|
|
|
|
using Lidarr.Http.REST;
|
|
|
|
|
using NzbDrone.Core.Configuration;
|
2017-09-04 02:20:56 +00:00
|
|
|
|
|
2017-10-31 01:28:29 +00:00
|
|
|
|
namespace Lidarr.Api.V1.Config
|
2017-09-04 02:20:56 +00:00
|
|
|
|
{
|
|
|
|
|
public class DownloadClientConfigResource : RestResource
|
|
|
|
|
{
|
|
|
|
|
public string DownloadClientWorkingFolders { get; set; }
|
|
|
|
|
|
|
|
|
|
public bool EnableCompletedDownloadHandling { get; set; }
|
|
|
|
|
public bool RemoveCompletedDownloads { get; set; }
|
|
|
|
|
|
|
|
|
|
public bool AutoRedownloadFailed { get; set; }
|
|
|
|
|
public bool RemoveFailedDownloads { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static class DownloadClientConfigResourceMapper
|
|
|
|
|
{
|
|
|
|
|
public static DownloadClientConfigResource ToResource(IConfigService model)
|
|
|
|
|
{
|
|
|
|
|
return new DownloadClientConfigResource
|
|
|
|
|
{
|
|
|
|
|
DownloadClientWorkingFolders = model.DownloadClientWorkingFolders,
|
|
|
|
|
|
|
|
|
|
EnableCompletedDownloadHandling = model.EnableCompletedDownloadHandling,
|
|
|
|
|
RemoveCompletedDownloads = model.RemoveCompletedDownloads,
|
|
|
|
|
|
|
|
|
|
AutoRedownloadFailed = model.AutoRedownloadFailed,
|
|
|
|
|
RemoveFailedDownloads = model.RemoveFailedDownloads
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|