Private GIT

Skip to content
Snippets Groups Projects
Commit c3e1fd17 authored by zone117x's avatar zone117x
Browse files

MoreThanTv completed

parent ec418636
Branches
Tags v0.1.1
No related merge requests found
......@@ -56,7 +56,7 @@ namespace Jackett.Indexers
return (ConfigurationData)config;
}
public async Task ApplyConfiguration(Newtonsoft.Json.Linq.JToken configJson)
public async Task ApplyConfiguration(JToken configJson)
{
var config = new ConfigurationDataBasicLogin();
......
......@@ -79,6 +79,7 @@
<Compile Include="Indexers\BitMeTV.cs" />
<Compile Include="Indexers\Freshon.cs" />
<Compile Include="Indexers\IPTorrents.cs" />
<Compile Include="Indexers\MoreThanTV.cs" />
<Compile Include="Indexers\ThePirateBay.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
......
......@@ -109,7 +109,8 @@ namespace Jackett
if (context.Request.Url.Segments.Length > 4 && context.Request.Url.Segments[3] == "download/")
{
var downloadLink = Encoding.UTF8.GetString(Convert.FromBase64String((context.Request.Url.Segments[4].TrimEnd('/'))));
var downloadSegment = HttpServerUtility.UrlTokenDecode(context.Request.Url.Segments[4].TrimEnd('/'));
var downloadLink = Encoding.UTF8.GetString(downloadSegment);
var downloadBytes = await indexer.Download(new Uri(downloadLink));
await context.Response.OutputStream.WriteAsync(downloadBytes, 0, downloadBytes.Length);
return;
......@@ -138,7 +139,7 @@ namespace Jackett
foreach (var release in releases)
{
var originalLink = release.Link;
var encodedLink = Convert.ToBase64String(Encoding.UTF8.GetBytes(originalLink.ToString())) + "/download.torrent";
var encodedLink = HttpServerUtility.UrlTokenEncode(Encoding.UTF8.GetBytes(originalLink.ToString())) + "/download.torrent";
var proxyLink = string.Format("{0}api/{1}/download/{2}", severUrl, indexerId, encodedLink);
release.Link = new Uri(proxyLink);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment