diff --git a/src/Jackett/Indexers/IPTorrents.cs b/src/Jackett/Indexers/IPTorrents.cs index a595907eed3cd608e12cb351ad2c4f552a8fe6cd..4c59fd8ac274bbb0a9262ffe03e64b21bffdef9f 100644 --- a/src/Jackett/Indexers/IPTorrents.cs +++ b/src/Jackett/Indexers/IPTorrents.cs @@ -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(); diff --git a/src/Jackett/Jackett.csproj b/src/Jackett/Jackett.csproj index 56eae05e69a67e85f09a0928c6fc6af9ab988868..98b968a8cc8aeadf2db27a390ce63049f69fcb72 100644 --- a/src/Jackett/Jackett.csproj +++ b/src/Jackett/Jackett.csproj @@ -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" /> diff --git a/src/Jackett/Server.cs b/src/Jackett/Server.cs index f460be0f370ba63c6e84dd00ef505af09d3e20ab..77fcf00e92d22070b1a80dcaf922372ec737b129 100644 --- a/src/Jackett/Server.cs +++ b/src/Jackett/Server.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); }