Merge pull request #765 from Cucumberrbob/feat/rd-configurable-api-url
feat: add setting to change RD api hostname
This commit is contained in:
commit
770e32c2cb
2 changed files with 8 additions and 1 deletions
|
|
@ -181,6 +181,13 @@ or
|
|||
<a href=""https://debrid-link.com/webapp/apikey"" target=""_blank"" rel=""noopener"">https://debrid-link.com/webapp/apikey</a>")]
|
||||
public String ApiKey { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// API hostname to use <b>for Real Debrid only</b>
|
||||
/// </summary>
|
||||
[DisplayName("API Hostname (RD only)")]
|
||||
[Description("Use this instead of the normal hostname for Real Debrid API requests. Only used by Real Debrid. Leave blank to use default.")]
|
||||
public String? ApiHostname { get; set; }
|
||||
|
||||
[DisplayName("Automatically import and process torrents added to provider")]
|
||||
[Description("When selected, import downloads that are not added through RealDebridClient but have been directly added to your debrid provider.")]
|
||||
public Boolean AutoImport { get; set; } = false;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public class RealDebridTorrentClient(ILogger<RealDebridTorrentClient> logger, IH
|
|||
var httpClient = httpClientFactory.CreateClient(DiConfig.RD_CLIENT);
|
||||
httpClient.Timeout = TimeSpan.FromSeconds(Settings.Get.Provider.Timeout);
|
||||
|
||||
var rdtNetClient = new RdNetClient(null, httpClient, 5);
|
||||
var rdtNetClient = new RdNetClient(null, httpClient, 5, Settings.Get.Provider.ApiHostname);
|
||||
rdtNetClient.UseApiAuthentication(apiKey);
|
||||
|
||||
// Get the server time to fix up the timezones on results
|
||||
|
|
|
|||
Loading…
Reference in a new issue