alpharatio: disable season only search. Resolves #8244

This commit is contained in:
monestri 2020-04-23 01:41:17 -04:00 committed by GitHub
parent ebb57e54d1
commit ea1ed86d7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions

View File

@ -58,7 +58,15 @@ namespace Jackett.Common.Indexers
AddCategoryMapping(30, TorznabCatType.Other, "Misc");
}
// Alpharatio can't handle dots in the searchstr
protected override string GetSearchTerm(TorznabQuery query) => query.GetQueryString().Replace(".", " ");
protected override string GetSearchTerm(TorznabQuery query)
{
// Ignore season search without episode. Alpharatio doesn't support it.
var searchTerm = string.IsNullOrWhiteSpace(query.Episode)
? query.SanitizedSearchTerm
: query.GetQueryString();
// Alpharatio can't handle dots in the searchstr
return searchTerm.Replace(".", " ");
}
}
}