public QBittorrentProxyV2(IHttpClient httpClient, ICacheManager cacheManager, Logger logger)
        {
            _httpClient = httpClient;
            _logger     = logger;

            _authCookieCache = cacheManager.GetCache <Dictionary <string, string> >(GetType(), "authCookies");
        }
Example #2
0
        public ReleaseModule(IAlbumService albumService,
                             IArtistService artistService,
                             IFetchAndParseRss rssFetcherAndParser,
                             ISearchForNzb nzbSearchService,
                             IMakeDownloadDecision downloadDecisionMaker,
                             IPrioritizeDownloadDecision prioritizeDownloadDecision,
                             IParsingService parsingService,
                             IDownloadService downloadService,
                             ICacheManager cacheManager,
                             Logger logger)
        {
            _albumService               = albumService;
            _artistService              = artistService;
            _rssFetcherAndParser        = rssFetcherAndParser;
            _nzbSearchService           = nzbSearchService;
            _downloadDecisionMaker      = downloadDecisionMaker;
            _prioritizeDownloadDecision = prioritizeDownloadDecision;
            _parsingService             = parsingService;
            _downloadService            = downloadService;
            _logger = logger;

            GetResourceAll = GetReleases;
            Post("/", x => DownloadRelease(ReadResourceFromRequest()));

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

            _remoteAlbumCache = cacheManager.GetCache <RemoteAlbum>(GetType(), "remoteAlbums");
        }
Example #3
0
        public ReleaseModule(IFetchAndParseRss rssFetcherAndParser,
                             ISearchForNzb nzbSearchService,
                             IMakeDownloadDecision downloadDecisionMaker,
                             IPrioritizeDownloadDecision prioritizeDownloadDecision,
                             IDownloadService downloadService,
                             IMovieService movieService,
                             ICacheManager cacheManager,
                             IProfileService qualityProfileService,
                             Logger logger)
            : base(qualityProfileService)
        {
            _rssFetcherAndParser        = rssFetcherAndParser;
            _nzbSearchService           = nzbSearchService;
            _downloadDecisionMaker      = downloadDecisionMaker;
            _prioritizeDownloadDecision = prioritizeDownloadDecision;
            _downloadService            = downloadService;
            _movieService = movieService;
            _logger       = logger;

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

            GetResourceAll = GetReleases;
            Post("/", x => DownloadRelease(ReadResourceFromRequest()));

            _remoteMovieCache = cacheManager.GetCache <RemoteMovie>(GetType(), "remoteMovies");
        }
Example #4
0
        public TransmissionProxy(ICacheManager cacheManager, IHttpClient httpClient, Logger logger)
        {
            _httpClient = httpClient;
            _logger = logger;

            _authSessionIDCache = cacheManager.GetCache<string>(GetType(), "authSessionID");
        }
Example #5
0
 public ScanWatchFolder(ICacheManager cacheManager, IDiskScanService diskScanService, IDiskProvider diskProvider, Logger logger)
 {
     _logger               = logger;
     _diskProvider         = diskProvider;
     _diskScanService      = diskScanService;
     _watchFolderItemCache = cacheManager.GetCache <Dictionary <string, WatchFolderItem> >(GetType());
 }
Example #6
0
 public ScanWatchFolder(ICacheManager cacheManager, IDiskScanService diskScanService, IDiskProvider diskProvider, Logger logger)
 {
     _logger = logger;
     _diskProvider = diskProvider;
     _diskScanService = diskScanService;
     _watchFolderItemCache = cacheManager.GetCache<Dictionary<string, WatchFolderItem>>(GetType());
 }
 public PlexServerService(ICacheManager cacheManager, IPlexServerProxy plexServerProxy, Logger logger)
 {
     _versionCache = cacheManager.GetCache<Version>(GetType(), "versionCache");
     _partialUpdateCache = cacheManager.GetCache<bool>(GetType(), "partialUpdateCache");
     _plexServerProxy = plexServerProxy;
     _logger = logger;
 }
Example #8
0
 public PlexServerService(ICacheManager cacheManager, IPlexServerProxy plexServerProxy, Logger logger)
 {
     _versionCache       = cacheManager.GetCache <Version>(GetType(), "versionCache");
     _partialUpdateCache = cacheManager.GetCache <bool>(GetType(), "partialUpdateCache");
     _plexServerProxy    = plexServerProxy;
     _logger             = logger;
 }
Example #9
0
        public DelugeProxy(ICacheManager cacheManager, IHttpClient httpClient, Logger logger)
        {
            _httpClient = httpClient;
            _logger     = logger;

            _authCookieCache = cacheManager.GetCache <Dictionary <string, string> >(GetType(), "authCookies");
        }
Example #10
0
        public TransmissionProxy(ICacheManager cacheManager, IHttpClient httpClient, Logger logger)
        {
            _httpClient = httpClient;
            _logger     = logger;

            _authSessionIDCache = cacheManager.GetCache <string>(GetType(), "authSessionID");
        }
Example #11
0
 public FallbackHttpDispatcher(ICached<bool> curlTLSFallbackCache, Logger logger)
 {
     _logger = logger;
     _curlTLSFallbackCache = curlTLSFallbackCache;
     _managedDispatcher = new ManagedHttpDispatcher();
     _curlDispatcher = new CurlHttpDispatcher();
 }
Example #12
0
        public TimedInvalidationCached(ICached <T> innerCached, TimeSpan invalidationFrequency)
        {
            this.innerCached = innerCached ?? throw new ArgumentNullException("innerCached");

            this.invalidationFrequency = invalidationFrequency;

            this.cancellationTokenSource = new CancellationTokenSource();
        }
 public FallbackHttpDispatcher(ManagedHttpDispatcher managedDispatcher, CurlHttpDispatcher curlDispatcher, ICacheManager cacheManager, IPlatformInfo platformInfo, Logger logger)
 {
     _managedDispatcher    = managedDispatcher;
     _curlDispatcher       = curlDispatcher;
     _platformInfo         = platformInfo;
     _curlTLSFallbackCache = cacheManager.GetCache <bool>(GetType(), "curlTLSFallback");
     _logger = logger;
 }
Example #14
0
        public AggregateCalibreData(Logger logger,
                                    ICacheManager cacheManager)
        {
            _logger    = logger;
            _bookCache = cacheManager.GetCache <CalibreBook>(typeof(CalibreProxy));

            _logger.Trace("Started calibre aug");
        }
Example #15
0
        public DownloadStationTaskProxySelector(DownloadStationTaskProxyV1 proxyV1, DownloadStationTaskProxyV2 proxyV2, ICacheManager cacheManager, Logger logger)
        {
            _proxyCache = cacheManager.GetCache <IDownloadStationTaskProxy>(GetType(), "taskProxy");
            _logger     = logger;

            _proxyV1 = proxyV1;
            _proxyV2 = proxyV2;
        }
Example #16
0
 public AlternativeYearModule(IMovieService movieService, ICacheManager cacheManager, IEventAggregator eventAggregator)
     : base("/altyear")
 {
     _movieService    = movieService;
     GetResourceById  = GetYear;
     _yearCache       = cacheManager.GetCache <int>(GetType(), "altYears");
     _eventAggregator = eventAggregator;
 }
Example #17
0
 public PassThePopcorn(IHttpClient httpClient, ICacheManager cacheManager, IIndexerStatusService indexerStatusService,
                       IConfigService configService, IParsingService parsingService, Logger logger)
     : base(httpClient, indexerStatusService, configService, parsingService, logger)
 {
     _httpClient      = httpClient;
     _logger          = logger;
     _authCookieCache = cacheManager.GetCache <Dictionary <string, string> >(GetType(), "authCookies");
 }
Example #18
0
        public UTorrentProxy(ICacheManager cacheManager, IHttpClient httpClient, Logger logger)
        {
            _httpClient = httpClient;
            _logger = logger;

            _authCookieCache = cacheManager.GetCache<Dictionary<string, string>>(GetType(), "authCookies");
            _authTokenCache = cacheManager.GetCache<string>(GetType(), "authTokens");
        }
Example #19
0
 public CustomFormatService(ICustomFormatRepository formatRepository,
                            ICacheManager cacheManager,
                            IEventAggregator eventAggregator)
 {
     _formatRepository = formatRepository;
     _eventAggregator  = eventAggregator;
     _cache            = cacheManager.GetCache <Dictionary <int, CustomFormat> >(typeof(CustomFormat), "formats");
 }
Example #20
0
        public DownloadSeedConfigProvider(IDownloadHistoryService downloadHistoryService, ISeedConfigProvider indexerSeedConfigProvider, ICacheManager cacheManager, Logger logger)
        {
            _logger = logger;
            _indexerSeedConfigProvider = indexerSeedConfigProvider;
            _downloadHistoryService    = downloadHistoryService;

            _cacheDownloads = cacheManager.GetRollingCache <CachedSeedConfiguration>(GetType(), "indexerByHash", TimeSpan.FromHours(1));
        }
Example #21
0
 public SharedFolderResolver(ICacheManager cacheManager,
                             IFileStationProxy proxy,
                             Logger logger)
 {
     _proxy  = proxy;
     _cache  = cacheManager.GetCache <SharedFolderMapping>(GetType());
     _logger = logger;
 }
Example #22
0
        public PlexServer(IPlexServerService plexServerService, IPlexTvService plexTvService, ICacheManager cacheManager, Logger logger)
        {
            _plexServerService = plexServerService;
            _plexTvService     = plexTvService;
            _logger            = logger;

            _pendingMoviesCache = cacheManager.GetRollingCache <PlexUpdateQueue>(GetType(), "pendingSeries", TimeSpan.FromDays(1));
        }
Example #23
0
 public SerialNumberProvider(ICacheManager cacheManager,
                             IDSMInfoProxy proxy,
                             Logger logger)
 {
     _proxy  = proxy;
     _cache  = cacheManager.GetCache <string>(GetType());
     _logger = logger;
 }
        public SceneMappingService(ISceneMappingRepository repository, ISceneMappingProxy sceneMappingProxy, ICacheManger cacheManger, Logger logger)
        {
            _repository        = repository;
            _sceneMappingProxy = sceneMappingProxy;

            _getSceneNameCache = cacheManger.GetCache <SceneMapping>(GetType(), "scene_name");
            _gettvdbIdCache    = cacheManger.GetCache <SceneMapping>(GetType(), "tvdb_id");
            _logger            = logger;
        }
Example #25
0
        public ICached <T> Build()
        {
            ICached <T> cached = BuildBaseCached();

            cached = BuildBackgroundRefreshedCached(cached);
            cached = BuildTimedInvalidationCached(cached);

            return(cached);
        }
Example #26
0
        public HttpClient(ICacheManager cacheManager, IRateLimitService rateLimitService, Logger logger)
        {
            _logger           = logger;
            _rateLimitService = rateLimitService;
            ServicePointManager.DefaultConnectionLimit = 12;

            _cookieContainerCache = cacheManager.GetCache <CookieContainer>(typeof(HttpClient));
            _curlTLSFallbackCache = cacheManager.GetCache <bool>(typeof(HttpClient), "curlTLSFallback");
        }
Example #27
0
        private ICached <T> BuildTimedInvalidationCached(ICached <T> innerCached)
        {
            if (this.invalidationFrequency.HasValue)
            {
                return(new TimedInvalidationCached <T>(innerCached, this.invalidationFrequency.Value));
            }

            return(innerCached);
        }
Example #28
0
 public CustomFormatService(ICustomFormatRepository formatRepository, ICacheManager cacheManager,
                            IContainer container,
                            Logger logger)
 {
     _formatRepository = formatRepository;
     _container        = container;
     _cache            = cacheManager.GetCache <Dictionary <int, CustomFormat> >(typeof(CustomFormat), "formats");
     _logger           = logger;
 }
Example #29
0
        public HttpClient(IEnumerable <IHttpRequestInterceptor> requestInterceptors, ICacheManager cacheManager, IRateLimitService rateLimitService, IHttpDispatcher httpDispatcher, Logger logger)
        {
            _requestInterceptors = requestInterceptors.ToList();
            _rateLimitService    = rateLimitService;
            _httpDispatcher      = httpDispatcher;
            _logger = logger;

            ServicePointManager.DefaultConnectionLimit = 12;
            _cookieContainerCache = cacheManager.GetCache <CookieContainer>(typeof(HttpClient));
        }
Example #30
0
 public EpisodeAddedService(ICacheManager cacheManager,
                            IManageCommandQueue commandQueueManager,
                            IEpisodeService episodeService,
                            Logger logger)
 {
     _commandQueueManager = commandQueueManager;
     _episodeService      = episodeService;
     _logger             = logger;
     _addedEpisodesCache = cacheManager.GetCache <List <int> >(GetType());
 }
Example #31
0
 public TrackedDownloadService(IParsingService parsingService,
     ICacheManager cacheManager,
     IHistoryService historyService,
     Logger logger)
 {
     _parsingService = parsingService;
     _historyService = historyService;
     _cache = cacheManager.GetCache<TrackedDownload>(GetType());
     _logger = logger;
 }
Example #32
0
 public FileNameBuilder(INamingConfigService namingConfigService,
                        IQualityDefinitionService qualityDefinitionService,
                        ICacheManager cacheManager,
                        Logger logger)
 {
     _namingConfigService      = namingConfigService;
     _qualityDefinitionService = qualityDefinitionService;
     _patternCache             = cacheManager.GetCache <EpisodeFormat>(GetType());
     _logger = logger;
 }
Example #33
0
 public TrackedDownloadService(IParsingService parsingService,
                               ICacheManager cacheManager,
                               IHistoryService historyService,
                               Logger logger)
 {
     _parsingService = parsingService;
     _historyService = historyService;
     _cache          = cacheManager.GetCache <TrackedDownload>(GetType());
     _logger         = logger;
 }
Example #34
0
 public LocalizationService(IConfigService configService,
                            IAppFolderInfo appFolderInfo,
                            ICacheManager cacheManager,
                            Logger logger)
 {
     _configService = configService;
     _appFolderInfo = appFolderInfo;
     _cache         = cacheManager.GetCache <Dictionary <string, string> >(typeof(Dictionary <string, string>), "localization");
     _logger        = logger;
 }
Example #35
0
 public DeemixProxy(ICacheManager cacheManager,
                    IHttpClient httpClient,
                    Logger logger)
 {
     _sessionCookieCache = cacheManager.GetCache <string>(GetType(), "sessionCookies");
     _startTimeCache     = cacheManager.GetCache <DateTime?>(GetType(), "startTimes");
     _userCache          = cacheManager.GetCache <DeemixUser>(GetType(), "user");
     _httpClient         = httpClient;
     _logger             = logger;
 }
Example #36
0
 public FileNameBuilder(INamingConfigService namingConfigService,
                        IQualityDefinitionService qualityDefinitionService,
                        ICacheManager cacheManager,
                        Logger logger)
 {
     _namingConfigService = namingConfigService;
     _qualityDefinitionService = qualityDefinitionService;
     _patternCache = cacheManager.GetCache<EpisodeFormat>(GetType());
     _logger = logger;
 }
Example #37
0
 public ConfigFileProvider(IAppFolderInfo appFolderInfo,
                           ICacheManager cacheManager,
                           IEventAggregator eventAggregator,
                           IDiskProvider diskProvider)
 {
     _cache           = cacheManager.GetCache <string>(GetType());
     _eventAggregator = eventAggregator;
     _diskProvider    = diskProvider;
     _configFile      = appFolderInfo.GetConfigPath();
 }
Example #38
0
        public XbmcService(IXbmcJsonApiProxy proxy,
                           IEnumerable<IApiProvider> apiProviders,
                           ICacheManager cacheManager,
                           Logger logger)
        {
            _proxy = proxy;
            _apiProviders = apiProviders;
            _logger = logger;

            _xbmcVersionCache = cacheManager.GetCache<XbmcVersion>(GetType());
        }
Example #39
0
 public FileNameBuilder(INamingConfigService namingConfigService,
                        IQualityDefinitionService qualityDefinitionService,
                        ICacheManager cacheManager,
                        Logger logger)
 {
     _namingConfigService = namingConfigService;
     _qualityDefinitionService = qualityDefinitionService;
     _episodeFormatCache = cacheManager.GetCache<EpisodeFormat[]>(GetType(), "episodeFormat");
     _absoluteEpisodeFormatCache = cacheManager.GetCache<AbsoluteEpisodeFormat[]>(GetType(), "absoluteEpisodeFormat");
     _logger = logger;
 }
        public RemotePathMappingService(IDownloadClientRepository downloadClientRepository,
                                        IRemotePathMappingRepository remotePathMappingRepository,
                                        IDiskProvider diskProvider,
                                        ICacheManager cacheManager,
                                        Logger logger)
        {
            _remotePathMappingRepository = remotePathMappingRepository;
            _diskProvider = diskProvider;
            _logger = logger;

            _cache = cacheManager.GetCache<List<RemotePathMapping>>(GetType());
        }
Example #41
0
 public SabnzbdClient(IConfigService configService,
                      IHttpProvider httpProvider,
                      ICacheManger cacheManger,
                      IParsingService parsingService,
                      Logger logger)
 {
     _configService = configService;
     _httpProvider = httpProvider;
     _parsingService = parsingService;
     _queueCache = cacheManger.GetCache<IEnumerable<QueueItem>>(GetType(), "queue");
     _logger = logger;
 }
Example #42
0
        public ReleaseModule(IFetchAndParseRss rssFetcherAndParser,
                             ISearchForNzb nzbSearchService,
                             IMakeDownloadDecision downloadDecisionMaker,
                             IPrioritizeDownloadDecision prioritizeDownloadDecision,
                             IDownloadService downloadService,
                             ICacheManager cacheManager,
                             Logger logger)
        {
            _rssFetcherAndParser = rssFetcherAndParser;
            _nzbSearchService = nzbSearchService;
            _downloadDecisionMaker = downloadDecisionMaker;
            _prioritizeDownloadDecision = prioritizeDownloadDecision;
            _downloadService = downloadService;
            _logger = logger;

            GetResourceAll = GetReleases;
            Post["/"] = x => DownloadRelease(this.Bind<ReleaseResource>());

            PostValidator.RuleFor(s => s.DownloadAllowed).Equal(true);
            PostValidator.RuleFor(s => s.Guid).NotEmpty();

            _remoteEpisodeCache = cacheManager.GetCache<RemoteEpisode>(GetType(), "remoteEpisodes");
        }
Example #43
0
 public PlexServerProxy(ICacheManager cacheManager, Logger logger)
 {
     _authCache = cacheManager.GetCache<string>(GetType(), "authCache");
     _logger = logger;
 }
 public ManagedWebProxyFactory(ICacheManager cacheManager)
 {
     _webProxyCache = cacheManager.GetCache<IWebProxy>(GetType(), "webProxy");
 }
 public TorrentRssParserFactory(ICacheManager cacheManager, ITorrentRssSettingsDetector torrentRssSettingsDetector, Logger logger)
 {
     _settingsCache = cacheManager.GetCache<TorrentRssIndexerParserSettings>(GetType());
     _torrentRssSettingsDetector = torrentRssSettingsDetector;
     _logger = logger;
 }
Example #46
0
 public DailySeriesService(IDailySeriesDataProxy proxy, ICacheManager cacheManager)
 {
     _proxy = proxy;
     _cache = cacheManager.GetCache<List<int>>(GetType());
 }
Example #47
0
 public QBittorrentProxy(ICacheManager cacheManager, Logger logger)
 {
     _logger = logger;
     _cookieContainer = new CookieContainer();
     _logins = cacheManager.GetCache<bool>(GetType(), "logins");
 }
Example #48
0
 public PlexServerProxy(ICacheManager cacheManager)
 {
     _authCache = cacheManager.GetCache<String>(GetType(), "authCache");
 }
 public NewznabCapabilitiesProvider(ICacheManager cacheManager, IHttpClient httpClient, Logger logger)
 {
     _capabilitiesCache = cacheManager.GetCache<NewznabCapabilities>(GetType());
     _httpClient = httpClient;
     _logger = logger;
 }
Example #50
0
 public RarbgTokenProvider(IHttpClient httpClient, ICacheManager cacheManager, Logger logger)
 {
     _httpClient = httpClient;
     _tokenCache = cacheManager.GetCache<string>(GetType());
     _logger = logger;
 }