1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2025-03-05 11:18:14 +00:00

assorted: fix AddTrustedCertificate (#14255)

* lostfilm: fix AddTrustedCertificate

* scenehd: fix AddTrustedCertificate

* fixup! lostfilm: fix AddTrustedCertificate
This commit is contained in:
Bogdan 2023-04-15 23:36:34 +03:00 committed by GitHub
parent 3edd971ab7
commit aef48af387
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 3 deletions

View file

@ -65,7 +65,6 @@ namespace Jackett.Common.Indexers
// https://www.lostfilm.tv/v_search.php?c=119&s=5&e=16 // https://www.lostfilm.tv/v_search.php?c=119&s=5&e=16
private string ReleaseUrl => SiteLink + "v_search.php"; private string ReleaseUrl => SiteLink + "v_search.php";
internal class TrackerUrlDetails internal class TrackerUrlDetails
{ {
internal string seriesId { get; private set; } internal string seriesId { get; private set; }
@ -123,7 +122,6 @@ namespace Jackett.Common.Indexers
cacheService: cs, cacheService: cs,
configData: new ConfigurationDataCaptchaLogin()) configData: new ConfigurationDataCaptchaLogin())
{ {
webclient.AddTrustedCertificate(new Uri(SiteLink).Host, "34287FB53A58EC6AE590E7DD7E03C70C0263CADC"); // for *.tw expired 01/Apr/21
} }
private TorznabCapabilities SetCapabilities() private TorznabCapabilities SetCapabilities()
@ -146,6 +144,13 @@ namespace Jackett.Common.Indexers
return caps; return caps;
} }
public override void LoadValuesFromJson(JToken jsonConfig, bool useProtectionService = false)
{
base.LoadValuesFromJson(jsonConfig, useProtectionService);
webclient?.AddTrustedCertificate(new Uri(SiteLink).Host, "34287FB53A58EC6AE590E7DD7E03C70C0263CADC"); // for *.tw expired 01/Apr/21
}
public override async Task<ConfigurationData> GetConfigurationForSetup() public override async Task<ConfigurationData> GetConfigurationForSetup()
{ {
// looks like after some failed login attempts there's a captcha // looks like after some failed login attempts there's a captcha

View file

@ -43,7 +43,6 @@ namespace Jackett.Common.Indexers
configData: new ConfigurationDataPasskey("You can find the Passkey if you generate a RSS " + configData: new ConfigurationDataPasskey("You can find the Passkey if you generate a RSS " +
"feed link. It's the last parameter in the URL.")) "feed link. It's the last parameter in the URL."))
{ {
webclient.AddTrustedCertificate(new Uri(SiteLink).Host, "3A4090096DD95D31306B14BFDD8F8C98F52A8EA8");
} }
private TorznabCapabilities SetCapabilities() private TorznabCapabilities SetCapabilities()
@ -80,6 +79,13 @@ namespace Jackett.Common.Indexers
return caps; return caps;
} }
public override void LoadValuesFromJson(JToken jsonConfig, bool useProtectionService = false)
{
base.LoadValuesFromJson(jsonConfig, useProtectionService);
webclient?.AddTrustedCertificate(new Uri(SiteLink).Host, "3A4090096DD95D31306B14BFDD8F8C98F52A8EA8");
}
public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson) public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
{ {
LoadValuesFromJson(configJson); LoadValuesFromJson(configJson);