public RargbSource(ILogService logger, IRargbParser parser)
        {
            _logger = logger ?? throw new ArgumentNullException(nameof(logger));
            _parser = parser ?? throw new ArgumentNullException(nameof(parser));

            _httpClient         = new HttpClient();
            _httpClient.Timeout = TimeSpan.FromMilliseconds(5000);
            _baseUrl            = ConfigurationManager.AppSettings["RargbUrl"];
            _searchEndpoint     = Path.Combine(_baseUrl, ConfigurationManager.AppSettings["RargbSearchEndpoint"]);
        }
Exemple #2
0
        public RargbSource(ILogService logger, IRargbParser parser)
        {
            _logger = logger ?? throw new ArgumentNullException(nameof(logger));
            _parser = parser ?? throw new ArgumentNullException(nameof(parser));

            _baseUrl = ConfigurationManager.AppSettings["RargbUrl"];

            _searchResource = ConfigurationManager.AppSettings["RargbSearchEndpoint"];
            _searchEndpoint = Path.Combine(_baseUrl, _searchResource);

            //_mirrors = new[]
            //{
            //    "https://rarbgproxied.org/",
            //    "https://rarbgget.org/",
            //    "https://rarbgunblock.com/",
            //    "https://rarbgmirror.com/",
            //    "https://rarbg2020.org/"
            //};
        }