Files
Readarr/src/NzbDrone.Api/Config/MediaManagementConfigModule.cs
T
Mark McDowall 7279b58a58 Metadata cleanup and fixes
Fixed: Episode metadata will be renamed to match episode file names on refresh
Fixed: Episode metadata is renamed when episode file is renamed
2014-02-22 14:03:23 -08:00

18 lines
717 B
C#

using System;
using FluentValidation;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Validation.Paths;
namespace NzbDrone.Api.Config
{
public class MediaManagementConfigModule : NzbDroneConfigModule<MediaManagementConfigResource>
{
public MediaManagementConfigModule(IConfigService configService, PathExistsValidator pathExistsValidator)
: base(configService)
{
SharedValidator.RuleFor(c => c.FileChmod).NotEmpty();
SharedValidator.RuleFor(c => c.FolderChmod).NotEmpty();
SharedValidator.RuleFor(c => c.RecycleBin).IsValidPath().SetValidator(pathExistsValidator).When(c => !String.IsNullOrWhiteSpace(c.RecycleBin));
}
}
}