1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-20 21:55:03 -04:00

Patch/onedr0p updates (#998)

* few small things

* update var names

* Validate Root Folder, Minimum Avability and ProfileId on List import.
This commit is contained in:
Devin Buhl
2017-03-03 21:32:52 -05:00
committed by GitHub
parent f7bc889723
commit aab425ee5b
7 changed files with 109 additions and 99 deletions
@@ -1,16 +1,17 @@
using NzbDrone.Api.ClientSchema;
using FluentValidation;
using NzbDrone.Api.ClientSchema;
using NzbDrone.Core.NetImport;
using NzbDrone.Core.Profiles;
using NzbDrone.Core.Validation.Paths;
namespace NzbDrone.Api.NetImport
{
public class NetImportModule : ProviderModuleBase<NetImportResource, INetImport, NetImportDefinition>
{
private readonly IProfileService _profileService;
public NetImportModule(NetImportFactory indexerFactory, IProfileService profileService)
: base(indexerFactory, "netimport")
public NetImportModule(NetImportFactory netImportFactory) : base(netImportFactory, "netimport")
{
_profileService = profileService;
PostValidator.RuleFor(c => c.RootFolderPath).NotNull();
PostValidator.RuleFor(c => c.MinimumAvailability).NotNull();
PostValidator.RuleFor(c => c.ProfileId).NotNull();
}
protected override void MapToResource(NetImportResource resource, NetImportDefinition definition)