mirror of
https://github.com/Jackett/Jackett.git
synced 2025-10-01 16:04:07 +02:00
Avistaz: search without season/episode
This commit is contained in:
@@ -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)
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user