Category mapping on TorrentLeech and AnimeBytes. Fix sparadic issue where downloads fail due to the url being too long.

This commit is contained in:
KZ
2015-08-13 22:51:49 +01:00
parent 3c0cae7166
commit e660c57ccb
20 changed files with 222 additions and 60 deletions

View File

@@ -396,8 +396,19 @@ namespace Jackett.Controllers
[HttpGet]
public List<TrackerCacheResult> GetCache()
{
var severUrl = string.Format("{0}://{1}:{2}/", Request.RequestUri.Scheme, Request.RequestUri.Host, Request.RequestUri.Port);
return cacheService.GetCachedResults(severUrl);
var serverUrl = string.Format("{0}://{1}:{2}/", Request.RequestUri.Scheme, Request.RequestUri.Host, Request.RequestUri.Port);
var results = cacheService.GetCachedResults();
foreach (var result in results)
{
var link = result.Link;
result.Link = serverService.ConvertToProxyLink(link, serverUrl, result.TrackerId);
if (result.Link != null && result.Link.Scheme != "magnet" && !string.IsNullOrWhiteSpace(Engine.Server.Config.BlackholeDir))
result.BlackholeLink = serverService.ConvertToProxyLink(link, serverUrl, result.TrackerId, "bh", string.Empty);
}
return results;
}
[Route("GetLogs")]