2017-09-04 02:20:56 +00:00
|
|
|
|
using NzbDrone.Core.Download;
|
|
|
|
|
|
2017-10-31 01:28:29 +00:00
|
|
|
|
namespace Lidarr.Api.V1.DownloadClient
|
2017-09-04 02:20:56 +00:00
|
|
|
|
{
|
|
|
|
|
public class DownloadClientModule : ProviderModuleBase<DownloadClientResource, IDownloadClient, DownloadClientDefinition>
|
|
|
|
|
{
|
|
|
|
|
public static readonly DownloadClientResourceMapper ResourceMapper = new DownloadClientResourceMapper();
|
|
|
|
|
|
|
|
|
|
public DownloadClientModule(IDownloadClientFactory downloadClientFactory)
|
|
|
|
|
: base(downloadClientFactory, "downloadclient", ResourceMapper)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void Validate(DownloadClientDefinition definition, bool includeWarnings)
|
|
|
|
|
{
|
2020-01-03 12:49:24 +00:00
|
|
|
|
if (!definition.Enable)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-04 02:20:56 +00:00
|
|
|
|
base.Validate(definition, includeWarnings);
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-01-03 12:49:24 +00:00
|
|
|
|
}
|