2020-06-07 01:37:12 +00:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
using System.Linq;
|
|
|
|
using Jackett.Common.Indexers.Abstract;
|
|
|
|
using Jackett.Common.Models;
|
|
|
|
using Jackett.Common.Services.Interfaces;
|
|
|
|
using Jackett.Common.Utils;
|
|
|
|
using Jackett.Common.Utils.Clients;
|
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
using NLog;
|
|
|
|
|
|
|
|
namespace Jackett.Common.Indexers
|
|
|
|
{
|
|
|
|
[ExcludeFromCodeCoverage]
|
|
|
|
public class ExoticaZ : AvistazTracker
|
|
|
|
{
|
|
|
|
public override string[] LegacySiteLinks { get; protected set; } =
|
|
|
|
{
|
|
|
|
"https://torrents.yourexotic.com/"
|
|
|
|
};
|
|
|
|
|
2020-12-11 22:14:21 +00:00
|
|
|
public ExoticaZ(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps,
|
|
|
|
ICacheService cs)
|
2020-06-07 01:37:12 +00:00
|
|
|
: base(id: "exoticaz",
|
|
|
|
name: "ExoticaZ",
|
|
|
|
description: "ExoticaZ (YourExotic) is a Private Torrent Tracker for 3X",
|
|
|
|
link: "https://exoticaz.to/",
|
2020-10-18 20:47:36 +00:00
|
|
|
caps: new TorznabCapabilities
|
|
|
|
{
|
|
|
|
MovieSearchParams = new List<MovieSearchParam>
|
|
|
|
{
|
|
|
|
MovieSearchParam.Q
|
|
|
|
}
|
|
|
|
},
|
2020-06-07 01:37:12 +00:00
|
|
|
configService: configService,
|
|
|
|
client: wc,
|
|
|
|
logger: l,
|
2020-12-11 22:14:21 +00:00
|
|
|
p: ps,
|
|
|
|
cs: cs
|
|
|
|
)
|
2020-06-07 01:37:12 +00:00
|
|
|
{
|
|
|
|
AddCategoryMapping(1, TorznabCatType.XXXx264);
|
2020-10-28 19:00:48 +00:00
|
|
|
AddCategoryMapping(2, TorznabCatType.XXXPack);
|
|
|
|
AddCategoryMapping(3, TorznabCatType.XXXPack);
|
|
|
|
AddCategoryMapping(4, TorznabCatType.XXXPack);
|
2020-06-07 01:37:12 +00:00
|
|
|
AddCategoryMapping(5, TorznabCatType.XXXDVD);
|
|
|
|
AddCategoryMapping(6, TorznabCatType.XXXOther);
|
2020-10-28 19:00:48 +00:00
|
|
|
AddCategoryMapping(7, TorznabCatType.XXXImageSet);
|
2020-06-07 01:37:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
protected override List<KeyValuePair<string, string>> GetSearchQueryParameters(TorznabQuery query)
|
|
|
|
{
|
|
|
|
var categoryMapping = MapTorznabCapsToTrackers(query).Distinct().ToList();
|
|
|
|
var qc = new List<KeyValuePair<string, string>> // NameValueCollection don't support cat[]=19&cat[]=6
|
|
|
|
{
|
|
|
|
{"in", "1"},
|
|
|
|
{"category", categoryMapping.Any() ? categoryMapping.First() : "0"},
|
|
|
|
{"search", GetSearchTerm(query).Trim()}
|
|
|
|
};
|
|
|
|
|
|
|
|
return qc;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override List<int> ParseCategories(TorznabQuery query, JToken row)
|
|
|
|
{
|
|
|
|
var cat = row.Value<JObject>("category").Properties().First().Name;
|
|
|
|
return MapTrackerCatToNewznab(cat).ToList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|