You've already forked Sonarr
							
							
				mirror of
				https://github.com/Sonarr/Sonarr.git
				synced 2025-10-31 00:07:55 +02:00 
			
		
		
		
	
		
			
	
	
		
			19 lines
		
	
	
		
			764 B
		
	
	
	
		
			C#
		
	
	
	
	
	
		
		
			
		
	
	
			19 lines
		
	
	
		
			764 B
		
	
	
	
		
			C#
		
	
	
	
	
	
|   | using System; | ||
|  | using FluentValidation; | ||
|  | using NzbDrone.Core.Configuration; | ||
|  | using NzbDrone.Core.Validation.Paths; | ||
|  | 
 | ||
|  | namespace NzbDrone.Api.Config | ||
|  | { | ||
|  |     public class DownloadClientConfigModule : NzbDroneConfigModule<DownloadClientConfigResource> | ||
|  |     { | ||
|  |         public DownloadClientConfigModule(IConfigService configService, RootFolderValidator rootFolderValidator, PathExistsValidator pathExistsValidator) | ||
|  |             : base(configService) | ||
|  |         {            | ||
|  |             SharedValidator.RuleFor(c => c.DownloadedEpisodesFolder) | ||
|  |                            .SetValidator(rootFolderValidator) | ||
|  |                            .SetValidator(pathExistsValidator) | ||
|  |                            .When(c => !String.IsNullOrWhiteSpace(c.DownloadedEpisodesFolder)); | ||
|  |         } | ||
|  |     } | ||
|  | } |