MoreThanTv completed

This commit is contained in:
zone117x
2015-04-18 19:47:13 -06:00
parent ec41863630
commit c3e1fd17c4
3 changed files with 5 additions and 3 deletions

View File

@@ -56,7 +56,7 @@ namespace Jackett.Indexers
return (ConfigurationData)config; return (ConfigurationData)config;
} }
public async Task ApplyConfiguration(Newtonsoft.Json.Linq.JToken configJson) public async Task ApplyConfiguration(JToken configJson)
{ {
var config = new ConfigurationDataBasicLogin(); var config = new ConfigurationDataBasicLogin();

View File

@@ -79,6 +79,7 @@
<Compile Include="Indexers\BitMeTV.cs" /> <Compile Include="Indexers\BitMeTV.cs" />
<Compile Include="Indexers\Freshon.cs" /> <Compile Include="Indexers\Freshon.cs" />
<Compile Include="Indexers\IPTorrents.cs" /> <Compile Include="Indexers\IPTorrents.cs" />
<Compile Include="Indexers\MoreThanTV.cs" />
<Compile Include="Indexers\ThePirateBay.cs" /> <Compile Include="Indexers\ThePirateBay.cs" />
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />

View File

@@ -109,7 +109,8 @@ namespace Jackett
if (context.Request.Url.Segments.Length > 4 && context.Request.Url.Segments[3] == "download/") 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)); var downloadBytes = await indexer.Download(new Uri(downloadLink));
await context.Response.OutputStream.WriteAsync(downloadBytes, 0, downloadBytes.Length); await context.Response.OutputStream.WriteAsync(downloadBytes, 0, downloadBytes.Length);
return; return;
@@ -138,7 +139,7 @@ namespace Jackett
foreach (var release in releases) foreach (var release in releases)
{ {
var originalLink = release.Link; 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); var proxyLink = string.Format("{0}api/{1}/download/{2}", severUrl, indexerId, encodedLink);
release.Link = new Uri(proxyLink); release.Link = new Uri(proxyLink);
} }