From 427428d09b87926135bcc1629fabfc8f9fec036e Mon Sep 17 00:00:00 2001 From: kaso17 Date: Tue, 17 Apr 2018 11:03:40 +0200 Subject: [PATCH] AlphaRatio: remove dots from search string --- src/Jackett.Common/Indexers/Abstract/GazelleTracker.cs | 8 +++++++- src/Jackett.Common/Indexers/AlphaRatio.cs | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Jackett.Common/Indexers/Abstract/GazelleTracker.cs b/src/Jackett.Common/Indexers/Abstract/GazelleTracker.cs index 3d62e8cf2..9955c8bcf 100644 --- a/src/Jackett.Common/Indexers/Abstract/GazelleTracker.cs +++ b/src/Jackett.Common/Indexers/Abstract/GazelleTracker.cs @@ -84,10 +84,16 @@ namespace Jackett.Common.Indexers.Abstract return IndexerConfigurationStatus.RequiresTesting; } + // hook to adjust the search term + protected virtual string GetSearchTerm(TorznabQuery query) + { + return query.GetQueryString(); + } + protected override async Task> PerformQuery(TorznabQuery query) { var releases = new List(); - var searchString = query.GetQueryString(); + var searchString = GetSearchTerm(query); var searchUrl = APIUrl; var queryCollection = new NameValueCollection(); diff --git a/src/Jackett.Common/Indexers/AlphaRatio.cs b/src/Jackett.Common/Indexers/AlphaRatio.cs index 56e784b07..da3f04f5c 100644 --- a/src/Jackett.Common/Indexers/AlphaRatio.cs +++ b/src/Jackett.Common/Indexers/AlphaRatio.cs @@ -47,5 +47,10 @@ namespace Jackett.Common.Indexers AddCategoryMapping(23, TorznabCatType.AudioOther, "Music"); AddCategoryMapping(24, TorznabCatType.Other, "Misc"); } + + protected override string GetSearchTerm(TorznabQuery query) + { + return query.GetQueryString().Replace(".", " "); // Alpharatio can't handle dots in the searchstr + } } }