mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Changed download urls
I changed the download urls, because the current way with segments (having the parameters between slashes) was causing problems with long encoded urls, since a segment can be no longer than 255 characters. It was changed to use regular url parameters which have no such limit on length.
This commit is contained in:
@@ -29,7 +29,7 @@ namespace Jackett.Controllers
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<HttpResponseMessage> Download(string indexerID, string path, string apikey)
|
||||
public async Task<HttpResponseMessage> Download(string indexerID, string path, string apikey, string file)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -54,6 +54,10 @@ namespace Jackett.Controllers
|
||||
var result = new HttpResponseMessage(HttpStatusCode.OK);
|
||||
result.Content = new ByteArrayContent(downloadBytes);
|
||||
result.Content.Headers.ContentType = new MediaTypeHeaderValue("application/x-bittorrent");
|
||||
result.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment")
|
||||
{
|
||||
FileName = file
|
||||
};
|
||||
return result;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
Reference in New Issue
Block a user