mteamtp: new api path. resolves #15433

This commit is contained in:
Garfield69 2024-06-20 19:53:36 +12:00
parent bfe944efcb
commit 5f485bf082
1 changed files with 4 additions and 2 deletions

View File

@ -215,8 +215,10 @@ namespace Jackett.Common.Indexers
searchQuery.Discount = "FREE"; searchQuery.Discount = "FREE";
} }
var ApiUrl = "https://api." + $"{SiteLink}".Substring(SiteLink.IndexOf('.') + 1);
var response = await RequestWithCookiesAndRetryAsync( var response = await RequestWithCookiesAndRetryAsync(
$"{SiteLink}api/torrent/search", $"{ApiUrl}api/torrent/search",
method: RequestType.POST, method: RequestType.POST,
rawbody: STJson.ToJson(searchQuery), rawbody: STJson.ToJson(searchQuery),
headers: new Dictionary<string, string> headers: new Dictionary<string, string>
@ -245,7 +247,7 @@ namespace Jackett.Common.Indexers
{ {
var torrentId = int.Parse(torrent.Id); var torrentId = int.Parse(torrent.Id);
var infoUrl = new Uri($"{SiteLink}detail/{torrentId}"); var infoUrl = new Uri($"{SiteLink}detail/{torrentId}");
var downloadUrl = new Uri($"{SiteLink}api/torrent/genDlToken?id={torrentId}"); var downloadUrl = new Uri($"{ApiUrl}api/torrent/genDlToken?id={torrentId}");
var release = new ReleaseInfo var release = new ReleaseInfo
{ {