mirror of https://github.com/Jackett/Jackett
Cardigann enhancements (#728)
* Cardigann: Use GET for landing site request * Cardigann: Add support for magnet links
This commit is contained in:
parent
dcc3f2df63
commit
23c13969ae
|
@ -333,7 +333,7 @@ namespace Jackett.Indexers
|
||||||
var pairs = new Dictionary<string, string>();
|
var pairs = new Dictionary<string, string>();
|
||||||
|
|
||||||
configData.CookieHeader.Value = null;
|
configData.CookieHeader.Value = null;
|
||||||
var landingResult = await RequestLoginAndFollowRedirect(LoginUrl, pairs, null, false, null, SiteLink, true);
|
var landingResult = await RequestStringWithCookies(LoginUrl, null, SiteLink);
|
||||||
|
|
||||||
var htmlParser = new HtmlParser();
|
var htmlParser = new HtmlParser();
|
||||||
var landingResultDocument = htmlParser.Parse(landingResult.Content);
|
var landingResultDocument = htmlParser.Parse(landingResult.Content);
|
||||||
|
@ -692,7 +692,15 @@ namespace Jackett.Indexers
|
||||||
switch (Field.Key)
|
switch (Field.Key)
|
||||||
{
|
{
|
||||||
case "download":
|
case "download":
|
||||||
release.Link = resolvePath(value);
|
if (value.StartsWith("magnet:"))
|
||||||
|
{
|
||||||
|
release.MagnetUri = new Uri(value);
|
||||||
|
release.Link = release.MagnetUri;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
release.Link = resolvePath(value);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "details":
|
case "details":
|
||||||
var url = resolvePath(value);
|
var url = resolvePath(value);
|
||||||
|
|
Loading…
Reference in New Issue