1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-21 22:05:43 -04:00
Files
Radarr/src/NzbDrone.Api/Config/DownloadClientConfigResource.cs
T
Tim Turner 5c22d0b61d Ensure drone factory runs on its specificed interval (#1067)
* Ensure drone factory runs on its specificed interval
* Fix the tests for DownloadedMovieImportServiceFixture
2017-03-08 16:07:51 -05:00

38 lines
1.4 KiB
C#

using NzbDrone.Api.REST;
using NzbDrone.Core.Configuration;
namespace NzbDrone.Api.Config
{
public class DownloadClientConfigResource : RestResource
{
public string DownloadedMoviesFolder { get; set; }
public string DownloadClientWorkingFolders { get; set; }
public int DownloadedMoviesScanInterval { 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
{
DownloadedMoviesFolder = model.DownloadedMoviesFolder,
DownloadClientWorkingFolders = model.DownloadClientWorkingFolders,
DownloadedMoviesScanInterval = model.DownloadedMoviesScanInterval,
EnableCompletedDownloadHandling = model.EnableCompletedDownloadHandling,
RemoveCompletedDownloads = model.RemoveCompletedDownloads,
AutoRedownloadFailed = model.AutoRedownloadFailed,
RemoveFailedDownloads = model.RemoveFailedDownloads
};
}
}
}