You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
1022 B
24 lines
1022 B
using NzbDrone.Core.ImportLists;
|
|
using NzbDrone.Core.Validation;
|
|
using NzbDrone.Core.Validation.Paths;
|
|
using Sonarr.Http;
|
|
|
|
namespace Sonarr.Api.V3.ImportLists
|
|
{
|
|
[V3ApiController]
|
|
public class ImportListController : ProviderControllerBase<ImportListResource, ImportListBulkResource, IImportList, ImportListDefinition>
|
|
{
|
|
public static readonly ImportListResourceMapper ResourceMapper = new ();
|
|
public static readonly ImportListBulkResourceMapper BulkResourceMapper = new ();
|
|
|
|
public ImportListController(IImportListFactory importListFactory, ProfileExistsValidator profileExistsValidator)
|
|
: base(importListFactory, "importlist", ResourceMapper, BulkResourceMapper)
|
|
{
|
|
Http.Validation.RuleBuilderExtensions.ValidId(SharedValidator.RuleFor(s => s.QualityProfileId));
|
|
|
|
SharedValidator.RuleFor(c => c.RootFolderPath).IsValidPath();
|
|
SharedValidator.RuleFor(c => c.QualityProfileId).SetValidator(profileExistsValidator);
|
|
}
|
|
}
|
|
}
|