2017-10-29 06:21:18 +00:00
|
|
|
|
using System.Collections.Generic;
|
2018-03-10 08:05:56 +00:00
|
|
|
|
using Jackett.Common.Indexers.Abstract;
|
|
|
|
|
using Jackett.Common.Models;
|
|
|
|
|
using Jackett.Common.Services.Interfaces;
|
|
|
|
|
using Jackett.Common.Utils.Clients;
|
2017-04-15 08:45:10 +00:00
|
|
|
|
using Newtonsoft.Json.Linq;
|
2017-10-29 06:21:18 +00:00
|
|
|
|
using NLog;
|
2017-04-15 08:45:10 +00:00
|
|
|
|
|
2018-03-10 08:05:56 +00:00
|
|
|
|
namespace Jackett.Common.Indexers
|
2017-02-02 13:53:28 +00:00
|
|
|
|
{
|
2017-07-03 05:15:47 +00:00
|
|
|
|
public class HDOnly : GazelleTracker
|
2017-02-02 13:53:28 +00:00
|
|
|
|
{
|
2017-11-05 09:42:03 +00:00
|
|
|
|
public HDOnly(IIndexerConfigurationService configService, WebClient webClient, Logger logger, IProtectionService protectionService)
|
2017-02-02 13:53:28 +00:00
|
|
|
|
: base(name: "HD-Only",
|
2017-10-01 09:26:07 +00:00
|
|
|
|
desc: "HD-Only (HD-O) is a FRENCH Private Torrent Tracker for HD MOVIES / TV",
|
2017-02-02 13:53:28 +00:00
|
|
|
|
link: "https://hd-only.org/",
|
2017-07-10 20:58:44 +00:00
|
|
|
|
configService: configService,
|
2017-02-02 13:53:28 +00:00
|
|
|
|
logger: logger,
|
|
|
|
|
protectionService: protectionService,
|
2017-12-05 15:44:47 +00:00
|
|
|
|
webClient: webClient,
|
2019-01-11 11:44:38 +00:00
|
|
|
|
supportsFreeleechTokens: false // ratiofree
|
2017-02-02 13:53:28 +00:00
|
|
|
|
)
|
|
|
|
|
{
|
|
|
|
|
Language = "fr-fr";
|
|
|
|
|
Type = "private";
|
|
|
|
|
|
|
|
|
|
// a few releases have "category":"S\u00e9ries" set
|
|
|
|
|
AddCategoryMapping(null, TorznabCatType.TV, "Séries");
|
|
|
|
|
|
|
|
|
|
// releaseType mappings
|
2017-04-15 08:45:10 +00:00
|
|
|
|
AddCategoryMapping(1, TorznabCatType.Movies, "Film");
|
|
|
|
|
AddCategoryMapping(3, TorznabCatType.TVAnime, "Dessin animé");
|
|
|
|
|
AddCategoryMapping(5, TorznabCatType.TV, "Série");
|
|
|
|
|
AddCategoryMapping(6, TorznabCatType.TVAnime, "Série Animée");
|
|
|
|
|
AddCategoryMapping(7, TorznabCatType.MoviesOther, "Film d'animation");
|
|
|
|
|
AddCategoryMapping(9, TorznabCatType.AudioVideo, "Concert");
|
|
|
|
|
AddCategoryMapping(11, TorznabCatType.TVDocumentary, "Documentaire");
|
|
|
|
|
AddCategoryMapping(13, TorznabCatType.MoviesOther, "Court-métrage");
|
|
|
|
|
AddCategoryMapping(14, TorznabCatType.MoviesOther, "Clip");
|
|
|
|
|
AddCategoryMapping(15, TorznabCatType.MoviesOther, "Démonstration");
|
|
|
|
|
AddCategoryMapping(16, TorznabCatType.MoviesOther, "Bonus de BD");
|
|
|
|
|
AddCategoryMapping(21, TorznabCatType.Other, "Autre");
|
2017-02-02 13:53:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
2017-04-15 08:45:10 +00:00
|
|
|
|
protected override bool ReleaseInfoPostParse(ReleaseInfo release, JObject torrent, JObject result)
|
|
|
|
|
{
|
|
|
|
|
// releaseType is used for categories
|
|
|
|
|
var category = (string)result["category"];
|
|
|
|
|
if (category == null)
|
|
|
|
|
{
|
|
|
|
|
var releaseType = (string)result["releaseType"];
|
|
|
|
|
release.Category = MapTrackerCatDescToNewznab(releaseType);
|
|
|
|
|
}
|
|
|
|
|
return true;
|
2017-02-02 13:53:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
2017-04-15 08:45:10 +00:00
|
|
|
|
protected override List<string> MapTorznabCapsToTrackers(TorznabQuery query, bool mapChildrenCatsToParent = false)
|
|
|
|
|
{
|
|
|
|
|
// don't use category filtering
|
|
|
|
|
return new List<string>();
|
2017-02-02 13:53:28 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2017-10-01 09:26:07 +00:00
|
|
|
|
}
|