Avistaz: search without season/episode

This commit is contained in:
kaso17
2018-04-06 14:32:46 +02:00
parent 402dd9d917
commit b9b5b3a442
2 changed files with 14 additions and 1 deletions

View File

@@ -26,6 +26,12 @@ namespace Jackett.Common.Indexers.Abstract
set { base.configData = value; }
}
// hook to adjust the search term
protected virtual string GetSearchTerm(TorznabQuery query)
{
return query.GetQueryString();
}
public AvistazTracker(IIndexerConfigurationService configService, Utils.Clients.WebClient webClient, Logger logger, IProtectionService protectionService, string name, string desc, string link)
: base(name: name,
description: desc,
@@ -84,7 +90,7 @@ namespace Jackett.Common.Indexers.Abstract
}
var episodeSearchUrl = string.Format(SearchUrl, category, WebUtility.UrlEncode(query.GetQueryString()));
var episodeSearchUrl = string.Format(SearchUrl, category, WebUtility.UrlEncode(GetSearchTerm(query)));
var response = await RequestStringWithCookiesAndRetry(episodeSearchUrl);
if (response.IsRedirect)

View File

@@ -1,4 +1,5 @@
using Jackett.Common.Indexers.Abstract;
using Jackett.Common.Models;
using Jackett.Common.Services.Interfaces;
using Jackett.Common.Utils.Clients;
using NLog;
@@ -19,5 +20,11 @@ namespace Jackett.Common.Indexers
{
Type = "private";
}
// hook to adjust the search term
protected override string GetSearchTerm(TorznabQuery query)
{
return query.SanitizedSearchTerm;
}
}
}