Fixed bug with download proxy url using indexerName instead of indexerID

This commit is contained in:
unknown
2015-07-22 21:21:29 -06:00
parent 9a15f8a965
commit bb32831e9f
3 changed files with 9 additions and 9 deletions

View File

@@ -29,9 +29,9 @@ namespace Jackett.Controllers
}
[HttpGet]
public async Task<HttpResponseMessage> Call(string indexerName)
public async Task<HttpResponseMessage> Call(string indexerID)
{
var indexer = indexerService.GetIndexer(indexerName);
var indexer = indexerService.GetIndexer(indexerID);
var torznabQuery = TorznabQuery.FromHttpQuery(HttpUtility.ParseQueryString(Request.RequestUri.Query));
if (string.Equals(torznabQuery.QueryType, "caps", StringComparison.InvariantCultureIgnoreCase))
@@ -70,7 +70,7 @@ namespace Jackett.Controllers
continue;
var originalLink = release.Link;
var encodedLink = HttpServerUtility.UrlTokenEncode(Encoding.UTF8.GetBytes(originalLink.ToString())) + "/download.torrent";
var proxyLink = string.Format("{0}api/{1}/download/{2}", severUrl, indexer.DisplayName, encodedLink);
var proxyLink = string.Format("{0}api/{1}/download/{2}", severUrl, indexer.ID, encodedLink);
release.Link = new Uri(proxyLink);
}