gazellegames: added option to search for groupnames only. resolves #5790 (#9747)

This commit is contained in:
seeyabye
2020-10-05 16:01:58 +09:00
committed by GitHub
parent 0742178b23
commit 8b8b89d516

View File

@@ -14,6 +14,7 @@ using Jackett.Common.Utils;
using Jackett.Common.Utils.Clients;
using Newtonsoft.Json.Linq;
using NLog;
using static Jackett.Common.Models.IndexerConfig.ConfigurationData;
namespace Jackett.Common.Indexers
{
@@ -45,6 +46,8 @@ namespace Jackett.Common.Indexers
Language = "en-us";
Type = "private";
configData.AddDynamic("searchgroupnames", new BoolItem() { Name = "Search Group Names Only", Value = false });
// Apple
AddCategoryMapping("Mac", TorznabCatType.ConsoleOther, "Mac");
AddCategoryMapping("iOS", TorznabCatType.PCPhoneIOS, "iOS");
@@ -207,9 +210,11 @@ namespace Jackett.Common.Indexers
var searchUrl = BrowseUrl;
var searchString = query.GetQueryString();
var searchType = ((BoolItem)configData.GetDynamic("searchgroupnames")).Value ? "groupname" : "searchstr";
var queryCollection = new NameValueCollection
{
{"searchstr", searchString},
{searchType, searchString},
{"order_by", "time"},
{"order_way", "desc"},
{"action", "basic"},
@@ -218,10 +223,8 @@ namespace Jackett.Common.Indexers
var i = 0;
foreach (var cat in MapTorznabCapsToTrackers(query))
{
queryCollection.Add("artistcheck[" + i + "]", cat);
i++;
}
queryCollection.Add($"artistcheck[{i++}]", cat);
searchUrl += "?" + queryCollection.GetQueryString();