Merge branch 'master' into dotnetcore

This commit is contained in:
flightlevel 2018-06-10 12:53:02 +10:00
commit 965da06214
8 changed files with 30 additions and 11 deletions

View File

@ -28,7 +28,7 @@
search:
paths:
- path: "list/{{if .Keywords}}{{.Keywords}}{{else}}movie{{end}}.html"
- path: "list/{{if .Keywords}}{{.Keywords}}{{else}}movie/1-1-0{{end}}.html"
rows:
selector: .rs
fields:

View File

@ -69,6 +69,8 @@
inputs:
$raw: "{{range .Categories}}c{{.}}=1&{{end}}"
search: "{{ .Keywords }}"
sort: "id"
order: "desc"
incldead: "1"
keywordsfilters:
- name: replace
@ -110,4 +112,4 @@
downloadvolumefactor:
text: "0"
uploadvolumefactor:
text: "1"
text: "1"

View File

@ -7,6 +7,8 @@
encoding: UTF-8
links:
- http://shareisland.org/
legacylinks:
- http://www.shareisland.org/
caps:
categorymappings:
@ -25,6 +27,7 @@
- {id: 41, cat: Books, desc: "Quotidiani"}
- {id: 59, cat: Books, desc: "Fumetti"}
- {id: 60, cat: Books, desc: "Riviste"}
- {id: 61, cat: Books, desc: "Audiolibri"}
# Games
- {id: 47, cat: PC/Games, desc: "Games PC"}
- {id: 22, cat: Console/Other, desc: "Nintendo"}

View File

@ -262,7 +262,6 @@ namespace Jackett.Common.Indexers
string groupTitle = null;
string groupYearStr = null;
var categoryStr = "";
DateTime? groupPublishDate = null;
foreach (var row in rows)
{

View File

@ -193,7 +193,7 @@ namespace Jackett.Common.Indexers
if (!isWindows && dotNetVersion.Major < 4)
{
// User isn't running Windows, but is running on .NET Core framewrok, no access to the DPAPI, so don't bother trying to migrate
// User isn't running Windows, but is running on .NET Core framework, no access to the DPAPI, so don't bother trying to migrate
return false;
}
@ -223,7 +223,12 @@ namespace Jackett.Common.Indexers
}
catch (Exception ex)
{
logger.Info("Password could not be unprotected using Microsoft.AspNetCore.DataProtection, trying legacy: " + ex.ToString());
if (ex.Message != "The provided payload cannot be decrypted because it was not protected with this protection provider.")
{
logger.Info($"Password could not be unprotected using Microsoft.AspNetCore.DataProtection - {ID} : " + ex);
}
logger.Info($"Attempting legacy Unprotect - {ID} : ");
try
{
@ -234,11 +239,13 @@ namespace Jackett.Common.Indexers
SaveConfig();
IsConfigured = true;
logger.Info($"Password successfully migrated for {ID}");
return true;
}
catch (Exception exception)
{
logger.Info("Password could not be unprotected using legacy DPAPI: " + exception.ToString());
logger.Info($"Password could not be unprotected using legacy DPAPI - {ID} : " + exception);
}
}
}

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
@ -167,7 +168,7 @@ namespace Jackett.Common.Indexers
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
{
Dictionary<string, string> qParams = new Dictionary<string, string>();
var qParams = new NameValueCollection();
qParams.Add("cata", "yes");
qParams.Add("sec", "jax");
@ -182,7 +183,9 @@ namespace Jackett.Common.Indexers
qParams.Add("search", query.GetQueryString());
}
var results = await PostDataWithCookiesAndRetry(SearchUrl, qParams);
var searchUrl = SearchUrl + "?" + qParams.GetQueryString();
var results = await RequestStringWithCookies(searchUrl);
List<ReleaseInfo> releases = ParseResponse(query, results.Content);
return releases;

View File

@ -467,8 +467,13 @@ namespace Jackett.Controllers
var link = result.Link;
var file = StringUtil.MakeValidFileName(result.Title, '_', false);
result.Link = serverService.ConvertToProxyLink(link, serverUrl, result.TrackerId, "dl", file);
if (result.Link != null && result.Link.Scheme != "magnet" && !string.IsNullOrWhiteSpace(Engine.ServerConfig.BlackholeDir))
result.BlackholeLink = serverService.ConvertToProxyLink(link, serverUrl, result.TrackerId, "bh", file);
if (!string.IsNullOrWhiteSpace(Engine.ServerConfig.BlackholeDir))
{
if (result.Link != null)
result.BlackholeLink = serverService.ConvertToProxyLink(link, serverUrl, result.TrackerId, "bh", file);
else if (result.MagnetUri != null)
result.BlackholeLink = serverService.ConvertToProxyLink(result.MagnetUri, serverUrl, result.TrackerId, "bh", file);
}
}
}

View File

@ -61,7 +61,7 @@ namespace Jackett.Services
public Uri ConvertToProxyLink(Uri link, string serverUrl, string indexerId, string action = "dl", string file = "t")
{
if (link == null || (link.IsAbsoluteUri && link.Scheme == "magnet"))
if (link == null || (link.IsAbsoluteUri && link.Scheme == "magnet" && action != "bh")) // no need to convert a magnet link to a proxy link unless it's a blackhole link
return link;
var encryptedLink = _protectionService.Protect(link.ToString());