RarBG: add app_id to API calls, now a requirement. #2753

This commit is contained in:
Garfield69
2018-03-21 13:19:03 +13:00
parent d4e184fbca
commit f4a0dfb6de

View File

@@ -26,7 +26,7 @@ namespace Jackett.Common.Indexers
set { configData.Url.Value = value.ToString(); } set { configData.Url.Value = value.ToString(); }
} }
private string ApiEndpoint { get { return BaseUri + "pubapi_v2.php"; } } private string ApiEndpoint { get { return BaseUri + "pubapi_v2.php?app_id=Jackett"; } }
private new ConfigurationDataUrl configData private new ConfigurationDataUrl configData
{ {
@@ -93,7 +93,7 @@ namespace Jackett.Common.Indexers
var queryCollection = new NameValueCollection(); var queryCollection = new NameValueCollection();
queryCollection.Add("get_token", "get_token"); queryCollection.Add("get_token", "get_token");
var tokenUrl = ApiEndpoint + "?" + queryCollection.GetQueryString(); var tokenUrl = ApiEndpoint + "&" + queryCollection.GetQueryString();
var result = await RequestStringWithCookiesAndRetry(tokenUrl); var result = await RequestStringWithCookiesAndRetry(tokenUrl);
var json = JObject.Parse(result.Content); var json = JObject.Parse(result.Content);
@@ -165,7 +165,7 @@ namespace Jackett.Common.Indexers
queryCollection.Add("category", cats); queryCollection.Add("category", cats);
} }
var searchUrl = ApiEndpoint + "?" + queryCollection.GetQueryString(); var searchUrl = ApiEndpoint + "&" + queryCollection.GetQueryString();
var response = await RequestStringWithCookiesAndRetry(searchUrl, string.Empty); var response = await RequestStringWithCookiesAndRetry(searchUrl, string.Empty);
try try