♻️ rename occurrences of debridlinkfr to debridlink
This commit is contained in:
parent
d6d1813340
commit
20fbf8833a
5 changed files with 14 additions and 14 deletions
|
|
@ -38,7 +38,7 @@ export class NavbarComponent implements OnInit {
|
||||||
case 'TorBox':
|
case 'TorBox':
|
||||||
this.providerLink = 'https://torbox.app/';
|
this.providerLink = 'https://torbox.app/';
|
||||||
break;
|
break;
|
||||||
case 'DebridLinkFr':
|
case 'DebridLink':
|
||||||
this.providerLink = 'https://debrid-link.com/';
|
this.providerLink = 'https://debrid-link.com/';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,6 @@ public enum Provider
|
||||||
[Description("TorBox")]
|
[Description("TorBox")]
|
||||||
TorBox,
|
TorBox,
|
||||||
|
|
||||||
[Description("DebridLinkFr")]
|
[Description("DebridLink")]
|
||||||
DebridLinkFr
|
DebridLink
|
||||||
}
|
}
|
||||||
|
|
@ -27,7 +27,7 @@ public static class DiConfig
|
||||||
services.AddScoped<TorBoxTorrentClient>();
|
services.AddScoped<TorBoxTorrentClient>();
|
||||||
services.AddScoped<Torrents>();
|
services.AddScoped<Torrents>();
|
||||||
services.AddScoped<TorrentRunner>();
|
services.AddScoped<TorrentRunner>();
|
||||||
services.AddScoped<DebridLinkFrClient>();
|
services.AddScoped<DebridLinkClient>();
|
||||||
|
|
||||||
services.AddSingleton<IAuthorizationHandler, AuthSettingHandler>();
|
services.AddSingleton<IAuthorizationHandler, AuthSettingHandler>();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,12 @@ using System.Web;
|
||||||
|
|
||||||
namespace RdtClient.Service.Services.TorrentClients;
|
namespace RdtClient.Service.Services.TorrentClients;
|
||||||
|
|
||||||
public class DebridLinkFrClient : ITorrentClient
|
public class DebridLinkClient : ITorrentClient
|
||||||
{
|
{
|
||||||
private readonly ILogger<DebridLinkFrClient> _logger;
|
private readonly ILogger<DebridLinkClient> _logger;
|
||||||
private readonly IHttpClientFactory _httpClientFactory;
|
private readonly IHttpClientFactory _httpClientFactory;
|
||||||
|
|
||||||
public DebridLinkFrClient(ILogger<DebridLinkFrClient> logger, IHttpClientFactory httpClientFactory)
|
public DebridLinkClient(ILogger<DebridLinkClient> logger, IHttpClientFactory httpClientFactory)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_httpClientFactory = httpClientFactory;
|
_httpClientFactory = httpClientFactory;
|
||||||
|
|
@ -34,28 +34,28 @@ public class DebridLinkFrClient : ITorrentClient
|
||||||
var httpClient = _httpClientFactory.CreateClient();
|
var httpClient = _httpClientFactory.CreateClient();
|
||||||
httpClient.Timeout = TimeSpan.FromSeconds(Settings.Get.Provider.Timeout);
|
httpClient.Timeout = TimeSpan.FromSeconds(Settings.Get.Provider.Timeout);
|
||||||
|
|
||||||
var debridLinkFrClient = new DebridLinkFrNETClient(apiKey, httpClient);
|
var DebridLinkClient = new DebridLinkFrNETClient(apiKey, httpClient);
|
||||||
|
|
||||||
return debridLinkFrClient;
|
return DebridLinkClient;
|
||||||
}
|
}
|
||||||
catch (AggregateException ae)
|
catch (AggregateException ae)
|
||||||
{
|
{
|
||||||
foreach (var inner in ae.InnerExceptions)
|
foreach (var inner in ae.InnerExceptions)
|
||||||
{
|
{
|
||||||
_logger.LogError(inner, $"The connection to DebridLinkFr has failed: {inner.Message}");
|
_logger.LogError(inner, $"The connection to DebridLink has failed: {inner.Message}");
|
||||||
}
|
}
|
||||||
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
catch (TaskCanceledException ex) when (ex.InnerException is TimeoutException)
|
catch (TaskCanceledException ex) when (ex.InnerException is TimeoutException)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, $"The connection to DebridLinkFr has timed out: {ex.Message}");
|
_logger.LogError(ex, $"The connection to DebridLink has timed out: {ex.Message}");
|
||||||
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
catch (TaskCanceledException ex)
|
catch (TaskCanceledException ex)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, $"The connection to DebridLinkFr has timed out: {ex.Message}");
|
_logger.LogError(ex, $"The connection to DebridLink has timed out: {ex.Message}");
|
||||||
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
@ -23,7 +23,7 @@ public class Torrents(
|
||||||
AllDebridTorrentClient allDebridTorrentClient,
|
AllDebridTorrentClient allDebridTorrentClient,
|
||||||
PremiumizeTorrentClient premiumizeTorrentClient,
|
PremiumizeTorrentClient premiumizeTorrentClient,
|
||||||
RealDebridTorrentClient realDebridTorrentClient,
|
RealDebridTorrentClient realDebridTorrentClient,
|
||||||
DebridLinkFrClient debridLinkFrClient,
|
DebridLinkClient DebridLinkClient,
|
||||||
TorBoxTorrentClient torBoxTorrentClient)
|
TorBoxTorrentClient torBoxTorrentClient)
|
||||||
{
|
{
|
||||||
private static readonly SemaphoreSlim RealDebridUpdateLock = new(1, 1);
|
private static readonly SemaphoreSlim RealDebridUpdateLock = new(1, 1);
|
||||||
|
|
@ -42,7 +42,7 @@ public class Torrents(
|
||||||
Provider.Premiumize => premiumizeTorrentClient,
|
Provider.Premiumize => premiumizeTorrentClient,
|
||||||
Provider.RealDebrid => realDebridTorrentClient,
|
Provider.RealDebrid => realDebridTorrentClient,
|
||||||
Provider.AllDebrid => allDebridTorrentClient,
|
Provider.AllDebrid => allDebridTorrentClient,
|
||||||
Provider.DebridLinkFr => debridLinkFrClient,
|
Provider.DebridLink => DebridLinkClient,
|
||||||
Provider.TorBox => torBoxTorrentClient,
|
Provider.TorBox => torBoxTorrentClient,
|
||||||
_ => throw new("Invalid Provider")
|
_ => throw new("Invalid Provider")
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue