public ReleaseModule(IFetchAndParseRss rssFetcherAndParser, ISearchForReleases releaseSearchService, IMakeDownloadDecision downloadDecisionMaker, IPrioritizeDownloadDecision prioritizeDownloadDecision, IDownloadService downloadService, ISeriesService seriesService, IEpisodeService episodeService, IParsingService parsingService, ICacheManager cacheManager, ILanguageProfileService languageProfileService, IQualityProfileService qualityProfileService, Logger logger) : base(languageProfileService, qualityProfileService) { _rssFetcherAndParser = rssFetcherAndParser; _releaseSearchService = releaseSearchService; _downloadDecisionMaker = downloadDecisionMaker; _prioritizeDownloadDecision = prioritizeDownloadDecision; _downloadService = downloadService; _seriesService = seriesService; _episodeService = episodeService; _parsingService = parsingService; _logger = logger; PostValidator.RuleFor(s => s.IndexerId).ValidId(); PostValidator.RuleFor(s => s.Guid).NotEmpty(); GetResourceAll = GetReleases; Post("/", x => DownloadRelease(ReadResourceFromRequest())); _remoteEpisodeCache = cacheManager.GetCache <RemoteEpisode>(GetType(), "remoteEpisodes"); }
public PersistenceProcessor( ICustomFormatService customFormatService, IQualityProfileService qualityProfileService, IConfigurationProvider configProvider, Func <IPersistenceProcessorSteps> stepsFactory) { _customFormatService = customFormatService; _qualityProfileService = qualityProfileService; _stepsFactory = stepsFactory; _configProvider = configProvider; _steps = _stepsFactory(); }
public ProfileModule(IQualityProfileService qualityProfileService) { _qualityProfileService = qualityProfileService; SharedValidator.RuleFor(c => c.Name).NotEmpty(); SharedValidator.RuleFor(c => c.Cutoff).ValidCutoff(); SharedValidator.RuleFor(c => c.Items).ValidItems(); GetResourceAll = GetAll; GetResourceById = GetById; UpdateResource = Update; CreateResource = Create; DeleteResource = DeleteProfile; }
public QualityProfileModule(IQualityProfileService qualityProfileService) { _qualityProfileService = qualityProfileService; SharedValidator.RuleFor(c => c.Name).NotEmpty(); SharedValidator.RuleFor(c => c.Cutoff).NotNull(); SharedValidator.RuleFor(c => c.Items).MustHaveAllowedQuality();//.SetValidator(new AllowedValidator<QualityProfileItemResource>()); GetResourceAll = GetAll; GetResourceById = GetById; UpdateResource = Update; CreateResource = Create; DeleteResource = DeleteProfile; }
public QueueModule(IBroadcastSignalRMessage broadcastSignalRMessage, IQueueService queueService, IPendingReleaseService pendingReleaseService, ILanguageProfileService languageProfileService, IQualityProfileService qualityProfileService) : base(broadcastSignalRMessage) { _queueService = queueService; _pendingReleaseService = pendingReleaseService; GetResourcePaged = GetQueue; LANGUAGE_COMPARER = new LanguageComparer(languageProfileService.GetDefaultProfile(string.Empty)); QUALITY_COMPARER = new QualityModelComparer(qualityProfileService.GetDefaultProfile(string.Empty)); }
public QualityProfileModule(IQualityProfileService qualityProfileService) : base("/qualityprofiles") { _qualityProfileService = qualityProfileService; SharedValidator.RuleFor(c => c.Name).NotEmpty(); SharedValidator.RuleFor(c => c.Cutoff).NotNull(); SharedValidator.RuleFor(c => c.Allowed).NotEmpty(); GetResourceAll = GetAll; GetResourceById = GetById; UpdateResource = Update; CreateResource = Create; DeleteResource = DeleteProfile; }
public ReleasePushModule(IMakeDownloadDecision downloadDecisionMaker, IProcessDownloadDecisions downloadDecisionProcessor, IIndexerFactory indexerFactory, ILanguageProfileService languageProfileService, IQualityProfileService qualityProfileService, Logger logger) : base(languageProfileService, qualityProfileService) { _downloadDecisionMaker = downloadDecisionMaker; _downloadDecisionProcessor = downloadDecisionProcessor; _indexerFactory = indexerFactory; _logger = logger; PostValidator.RuleFor(s => s.Title).NotEmpty(); PostValidator.RuleFor(s => s.DownloadUrl).NotEmpty(); PostValidator.RuleFor(s => s.Protocol).NotEmpty(); PostValidator.RuleFor(s => s.PublishDate).NotEmpty(); Post("/push", x => ProcessRelease(ReadResourceFromRequest())); }
public EpisodeCutoffService(IEpisodeRepository episodeRepository, IQualityProfileService qualityProfileService, Logger logger) { _episodeRepository = episodeRepository; _qualityProfileService = qualityProfileService; _logger = logger; }
public ReleaseModuleBase(ILanguageProfileService languageProfileService, IQualityProfileService qualityProfileService) { LANGUAGE_PROFILE = languageProfileService.GetDefaultProfile(string.Empty); QUALITY_PROFILE = qualityProfileService.GetDefaultProfile(string.Empty); }
public ProfileExistsValidator(IQualityProfileService qualityProfileService) : base("QualityProfile does not exist") { _qualityProfileService = qualityProfileService; }
public EpisodeCutoffService(IEpisodeRepository episodeRepository, IQualityProfileService qualityProfileService, ILanguageProfileService languageProfileService, Logger logger) { _episodeRepository = episodeRepository; _qualityProfileService = qualityProfileService; _languageProfileService = languageProfileService; }
public QualityProfileSchemaModule(IQualityProfileService qualityProfileService) : base("/qualityprofile/schema") { _qualityProfileService = qualityProfileService; GetResourceSingle = GetSchema; }