예제 #1
0
 public RefreshAuthorService(IProvideAuthorInfo authorInfo,
                             IAuthorService authorService,
                             IAuthorMetadataService authorMetadataService,
                             IBookService bookService,
                             IMetadataProfileService metadataProfileService,
                             IRefreshBookService refreshBookService,
                             IRefreshSeriesService refreshSeriesService,
                             IEventAggregator eventAggregator,
                             IManageCommandQueue commandQueueManager,
                             IMediaFileService mediaFileService,
                             IHistoryService historyService,
                             IRootFolderService rootFolderService,
                             ICheckIfAuthorShouldBeRefreshed checkIfAuthorShouldBeRefreshed,
                             IConfigService configService,
                             IImportListExclusionService importListExclusionService,
                             Logger logger)
     : base(logger, authorMetadataService)
 {
     _authorInfo                     = authorInfo;
     _authorService                  = authorService;
     _bookService                    = bookService;
     _metadataProfileService         = metadataProfileService;
     _refreshBookService             = refreshBookService;
     _refreshSeriesService           = refreshSeriesService;
     _eventAggregator                = eventAggregator;
     _commandQueueManager            = commandQueueManager;
     _mediaFileService               = mediaFileService;
     _historyService                 = historyService;
     _rootFolderService              = rootFolderService;
     _checkIfAuthorShouldBeRefreshed = checkIfAuthorShouldBeRefreshed;
     _configService                  = configService;
     _importListExclusionService     = importListExclusionService;
     _logger = logger;
 }
예제 #2
0
        public MetadataProfileModule(IMetadataProfileService profileService)
        {
            _profileService = profileService;
            SharedValidator.RuleFor(c => c.Name).NotEqual("None").WithMessage("'None' is a reserved profile name").NotEmpty();

            GetResourceAll  = GetAll;
            GetResourceById = GetById;
            UpdateResource  = Update;
            CreateResource  = Create;
            DeleteResource  = DeleteProfile;
        }
예제 #3
0
 public MetadataProfileController(IMetadataProfileService profileService)
 {
     _profileService = profileService;
     SharedValidator.RuleFor(c => c.Name).NotEqual("None").WithMessage("'None' is a reserved profile name").NotEmpty();
     SharedValidator.RuleFor(c => c.AllowedLanguages)
     .Must(x => x
           .Trim(',')
           .Split(',')
           .Select(y => y.Trim())
           .All(y => y == "null" || NzbDrone.Core.Books.Calibre.Extensions.KnownLanguages.Contains(y)))
     .When(x => x.AllowedLanguages.IsNotNullOrWhiteSpace())
     .WithMessage("Unknown languages");
 }
예제 #4
0
        public MetadataProfileModule(IMetadataProfileService profileService)
        {
            _profileService = profileService;
            SharedValidator.RuleFor(c => c.Name).NotEqual("None").WithMessage("'None' is a reserved profile name").NotEmpty();
            SharedValidator.RuleFor(c => c.PrimaryAlbumTypes).MustHaveAllowedPrimaryType();
            SharedValidator.RuleFor(c => c.SecondaryAlbumTypes).MustHaveAllowedSecondaryType();
            SharedValidator.RuleFor(c => c.ReleaseStatuses).MustHaveAllowedReleaseStatus();

            GetResourceAll  = GetAll;
            GetResourceById = GetById;
            UpdateResource  = Update;
            CreateResource  = Create;
            DeleteResource  = DeleteProfile;
        }
예제 #5
0
 public SkyHookProxy(IHttpClient httpClient,
                     IMetadataRequestBuilder requestBuilder,
                     IArtistService artistService,
                     IAlbumService albumService,
                     Logger logger,
                     IConfigService configService,
                     IMetadataProfileService metadataProfileService)
 {
     _httpClient             = httpClient;
     _configService          = configService;
     _metadataProfileService = metadataProfileService;
     _requestBuilder         = requestBuilder;
     _artistService          = artistService;
     _albumService           = albumService;
     _logger = logger;
 }
예제 #6
0
 public SkyHookProxy(IHttpClient httpClient,
                     IMetadataRequestBuilder requestBuilder,
                     IArtistService artistService,
                     IAlbumService albumService,
                     Logger logger,
                     IMetadataProfileService metadataProfileService,
                     ICacheManager cacheManager)
 {
     _httpClient             = httpClient;
     _metadataProfileService = metadataProfileService;
     _requestBuilder         = requestBuilder;
     _artistService          = artistService;
     _albumService           = albumService;
     _cache  = cacheManager.GetCache <HashSet <string> >(GetType());
     _logger = logger;
 }
예제 #7
0
 public MetadataProfileExistsValidator(IMetadataProfileService profileService)
     : base("Metadata profile does not exist")
 {
     _profileService = profileService;
 }
예제 #8
0
 public MetadataProfileController(IMetadataProfileService profileService)
 {
     _profileService = profileService;
     SharedValidator.RuleFor(c => c.Name).NotEqual("None").WithMessage("'None' is a reserved profile name").NotEmpty();
 }