Ejemplo n.º 1
0
        public ReleasePushModule(IMakeDownloadDecision downloadDecisionMaker,
                                 IProcessDownloadDecisions downloadDecisionProcessor,
                                 IIndexerFactory indexerFactory,
                                 Logger logger)
        {
            _downloadDecisionMaker     = downloadDecisionMaker;
            _downloadDecisionProcessor = downloadDecisionProcessor;
            _indexerFactory            = indexerFactory;
            _logger = logger;

            Post("/push", x => ProcessRelease(ReadResourceFromRequest()));

            PostValidator.RuleFor(s => s.Title).NotEmpty();
            PostValidator.RuleFor(s => s.DownloadUrl).NotEmpty();
            PostValidator.RuleFor(s => s.Protocol).NotEmpty();
            PostValidator.RuleFor(s => s.PublishDate).NotEmpty();
        }
Ejemplo n.º 2
0
 public RssSyncService(IIndexerStatusService indexerStatusService,
                       IIndexerFactory indexerFactory,
                       IFetchAndParseRss rssFetcherAndParser,
                       IMakeDownloadDecision downloadDecisionMaker,
                       IProcessDownloadDecisions processDownloadDecisions,
                       IPendingReleaseService pendingReleaseService,
                       IEventAggregator eventAggregator,
                       Logger logger)
 {
     _indexerStatusService     = indexerStatusService;
     _indexerFactory           = indexerFactory;
     _rssFetcherAndParser      = rssFetcherAndParser;
     _downloadDecisionMaker    = downloadDecisionMaker;
     _processDownloadDecisions = processDownloadDecisions;
     _pendingReleaseService    = pendingReleaseService;
     _eventAggregator          = eventAggregator;
     _logger = logger;
 }
Ejemplo n.º 3
0
        public ReleaseProfileController(IReleaseProfileService releaseProfileService, IIndexerFactory indexerFactory)
        {
            _releaseProfileService = releaseProfileService;
            _indexerFactory        = indexerFactory;

            SharedValidator.RuleFor(r => r).Custom((restriction, context) =>
            {
                if (restriction.Ignored.IsNullOrWhiteSpace() && restriction.Required.IsNullOrWhiteSpace() && restriction.Preferred.Empty())
                {
                    context.AddFailure("Either 'Must contain' or 'Must not contain' is required");
                }

                if (restriction.Enabled && restriction.IndexerId != 0 && !_indexerFactory.Exists(restriction.IndexerId))
                {
                    context.AddFailure(nameof(ReleaseProfile.IndexerId), "Indexer does not exist");
                }
            });
        }
Ejemplo n.º 4
0
 public TagService(ITagRepository repo,
                   IEventAggregator eventAggregator,
                   IDelayProfileService delayProfileService,
                   IImportListFactory importListFactory,
                   INotificationFactory notificationFactory,
                   IRestrictionService restrictionService,
                   IMovieService movieService,
                   IIndexerFactory indexerService)
 {
     _repo                = repo;
     _eventAggregator     = eventAggregator;
     _delayProfileService = delayProfileService;
     _importListFactory   = importListFactory;
     _notificationFactory = notificationFactory;
     _restrictionService  = restrictionService;
     _movieService        = movieService;
     _indexerService      = indexerService;
 }
Ejemplo n.º 5
0
 public TagService(ITagRepository repo,
                   IEventAggregator eventAggregator,
                   IDelayProfileService delayProfileService,
                   IImportListFactory importListFactory,
                   INotificationFactory notificationFactory,
                   IReleaseProfileService releaseProfileService,
                   ISeriesService seriesService,
                   IIndexerFactory indexerService)
 {
     _repo                  = repo;
     _eventAggregator       = eventAggregator;
     _delayProfileService   = delayProfileService;
     _importListFactory     = importListFactory;
     _notificationFactory   = notificationFactory;
     _releaseProfileService = releaseProfileService;
     _seriesService         = seriesService;
     _indexerService        = indexerService;
 }
Ejemplo n.º 6
0
        public ReleaseProfileModule(IReleaseProfileService releaseProfileService, IIndexerFactory indexerFactory)
        {
            _releaseProfileService = releaseProfileService;
            _indexerFactory        = indexerFactory;

            GetResourceById = GetById;
            GetResourceAll  = GetAll;
            CreateResource  = Create;
            UpdateResource  = Update;
            DeleteResource  = DeleteById;

            SharedValidator.RuleFor(r => r).Custom((restriction, context) =>
            {
                if (restriction.Ignored.IsNullOrWhiteSpace() && restriction.Required.IsNullOrWhiteSpace() && restriction.Preferred.Empty())
                {
                    context.AddFailure("Either 'Must contain' or 'Must not contain' is required");
                }

                if (restriction.Enabled && restriction.IndexerId != 0 && !_indexerFactory.Exists(restriction.IndexerId))
                {
                    context.AddFailure(nameof(ReleaseProfile.IndexerId), "Indexer does not exist");
                }
            });
        }
Ejemplo n.º 7
0
 public IndexerSearchCheck(IIndexerFactory indexerFactory)
 {
     _indexerFactory = indexerFactory;
 }
Ejemplo n.º 8
0
 public PTPOldSettingsCheck(IIndexerFactory indexerFactory, ILocalizationService localizationService)
     : base(localizationService)
 {
     _indexerFactory = indexerFactory;
 }
Ejemplo n.º 9
0
 public FetchAndParseRssService(IIndexerFactory indexerFactory, Logger logger)
 {
     _indexerFactory = indexerFactory;
     _logger         = logger;
 }
Ejemplo n.º 10
0
 public EarlyReleaseSpecification(IIndexerFactory indexerFactory, Logger logger)
 {
     _indexerFactory = indexerFactory;
     _logger         = logger;
 }
Ejemplo n.º 11
0
 public IndexerJackettAllCheck(IIndexerFactory providerFactory, ILocalizationService localizationService)
     : base(localizationService)
 {
     _providerFactory = providerFactory;
 }
Ejemplo n.º 12
0
 public UpdateAnimeCategories(IIndexerFactory indexerFactory, Logger logger)
 {
     _indexerFactory = indexerFactory;
     _logger         = logger;
 }
Ejemplo n.º 13
0
 public IndexerStatusCheck(IIndexerFactory indexerFactory, IIndexerStatusService indexerStatusService)
 {
     _indexerFactory = indexerFactory;
     _indexerStatusService = indexerStatusService;
 }
Ejemplo n.º 14
0
 public IndexerLongTermStatusCheck(IIndexerFactory providerFactory, IIndexerStatusService providerStatusService)
 {
     _providerFactory       = providerFactory;
     _providerStatusService = providerStatusService;
 }
Ejemplo n.º 15
0
 public IndexerCheck(IIndexerFactory indexerFactory)
 {
     _indexerFactory = indexerFactory;
 }
Ejemplo n.º 16
0
 public SeedConfigProvider(IIndexerFactory indexerFactory)
 {
     _indexerFactory = indexerFactory;
 }
Ejemplo n.º 17
0
 public NoDefinitionCheck(IIndexerDefinitionUpdateService indexerDefinitionUpdateService, IIndexerFactory indexerFactory, ILocalizationService localizationService)
     : base(localizationService)
 {
     _indexerDefinitionUpdateService = indexerDefinitionUpdateService;
     _indexerFactory = indexerFactory;
 }
Ejemplo n.º 18
0
 public IndexerVIPCheck(IIndexerFactory indexerFactory, ILocalizationService localizationService)
     : base(localizationService)
 {
     _indexerFactory = indexerFactory;
 }
Ejemplo n.º 19
0
 public FetchAndParseRssService(IIndexerFactory indexerFactory, IFetchFeedFromIndexers feedFetcher, Logger logger)
 {
     _indexerFactory = indexerFactory;
     _feedFetcher    = feedFetcher;
     _logger         = logger;
 }
Ejemplo n.º 20
0
 public AugmentWithReleaseInfo(IIndexerFactory indexerFactory)
 {
     _indexerFactory = indexerFactory;
 }
Ejemplo n.º 21
0
 public OutdatedDefinitionCheck(IIndexerDefinitionUpdateService indexerDefinitionUpdateService, IIndexerFactory indexerFactory, ILocalizationService localizationService, Logger logger)
     : base(localizationService)
 {
     _indexerDefinitionUpdateService = indexerDefinitionUpdateService;
     _indexerFactory = indexerFactory;
     _logger         = logger;
 }
Ejemplo n.º 22
0
 public IndexerSchemaModule(IIndexerFactory indexerFactory)
     : base("indexer/schema")
 {
     _indexerFactory = indexerFactory;
     GetResourceAll  = GetSchema;
 }
Ejemplo n.º 23
0
 public RedactedGazelleCheck(IIndexerFactory indexerFactory)
 {
     _indexerFactory = indexerFactory;
 }
Ejemplo n.º 24
0
 public TorrentSeedingSpecification(IIndexerFactory indexerFactory, Logger logger)
 {
     _indexerFactory = indexerFactory;
     _logger         = logger;
 }
Ejemplo n.º 25
0
 public IndexerTagSpecification(Logger logger, IIndexerFactory indexerFactory)
 {
     _logger         = logger;
     _indexerFactory = indexerFactory;
 }
Ejemplo n.º 26
0
 public IndexerStatusCheck(IIndexerFactory indexerFactory, IIndexerStatusService indexerStatusService)
 {
     _indexerFactory       = indexerFactory;
     _indexerStatusService = indexerStatusService;
 }
 public IndexerStatisticsService(IHistoryService historyService, IIndexerFactory indexerFactory)
 {
     _historyService = historyService;
     _indexerFactory = indexerFactory;
 }
Ejemplo n.º 28
0
 public IndexerRssCheck(IIndexerFactory indexerFactory)
 {
     _indexerFactory = indexerFactory;
 }
Ejemplo n.º 29
0
 public UpdateAnimeCategories(IIndexerFactory indexerFactory, Logger logger)
 {
     _indexerFactory = indexerFactory;
     _logger = logger;
 }
Ejemplo n.º 30
0
 public ApplicationService(IApplicationFactory applicationsFactory, IApplicationStatusService applicationStatusService, IAppIndexerMapService appIndexerMapService, IIndexerFactory indexerFactory, Logger logger)
 {
     _applicationsFactory      = applicationsFactory;
     _applicationStatusService = applicationStatusService;
     _appIndexerMapService     = appIndexerMapService;
     _indexerFactory           = indexerFactory;
     _logger = logger;
 }
Ejemplo n.º 31
0
 public FileSystemIndexer(IIndexerFactory indexerFactory)
 {
     _indexerFactory = indexerFactory;
 }
Ejemplo n.º 32
0
 public FetchAndParseRssService(IIndexerFactory indexerFactory, Logger logger)
 {
     _indexerFactory = indexerFactory;
     _logger = logger;
 }
Ejemplo n.º 33
0
 public IndexFolderConsoleTask(IIndexerFactory indexerFactory)
 {
     _indexerFactory = indexerFactory;
 }
Ejemplo n.º 34
0
        public SearchController(ISearchForNzb nzbSearhService, IDownloadService downloadService, IIndexerFactory indexerFactory, IDownloadMappingService downloadMappingService, ICacheManager cacheManager, Logger logger)
        {
            _nzbSearhService        = nzbSearhService;
            _downloadService        = downloadService;
            _indexerFactory         = indexerFactory;
            _downloadMappingService = downloadMappingService;
            _logger = logger;

            PostValidator.RuleFor(s => s.IndexerId).ValidId();
            PostValidator.RuleFor(s => s.Guid).NotEmpty();

            _remoteReleaseCache = cacheManager.GetCache <ReleaseInfo>(GetType(), "remoteReleases");
        }
Ejemplo n.º 35
0
 public FetchAndParseRssService(IIndexerFactory indexerFactory, IFetchFeedFromIndexers feedFetcher, Logger logger)
 {
     _indexerFactory = indexerFactory;
     _feedFetcher = feedFetcher;
     _logger = logger;
 }