mirror of
https://github.com/Jackett/Jackett
synced 2024-12-28 10:50:47 +00:00
rutracker + nnmclub title parsing improvements (#2566)
* newstudio - new ru semi-private tracker rutracker - add series parser rutor - global search without category + series parser * newstudio rus semi-private tracker * 999 -> 99 * remove old definition * - add newstudio tracker to the README - newstudio def: remove reduntal inputs - rutor def: revert setting usage into query * nnm-club: new russian semi-private tracker newstudo: fix quality naming * readme * fix quality naming * seasons parsing fix * fix * follow redirect on torrent file download * nnm-club + rutracker name parsing improvements * rutracker: add strip russian letters option
This commit is contained in:
parent
3ce6296a58
commit
b53a30a267
3 changed files with 33 additions and 5 deletions
|
@ -717,12 +717,14 @@
|
|||
title:
|
||||
selector: a[href^="viewtopic.php?t="] > b
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["Кураж-Бамбей", "kurazh"]
|
||||
- name: re_replace
|
||||
args: ["(\\([А-Яа-я\\W]+\\))|(^[А-Яа-я\\W\\d]+\\/ )|([а-яА-Я \\-]+,+)|([а-яА-Я]+)", ""]
|
||||
- name: re_replace
|
||||
args: ["\\b(\\d)\\b", "0$1"]
|
||||
- name: re_replace
|
||||
args: ["(\\([Сс]езон\\s+(\\d+).+[Сс]ери[ия]\\s+(?:(\\d+-*\\d*).*\\d+)*\\))", "(S$2E$3) RUS"]
|
||||
- name: replace
|
||||
args: ["Кураж-Бамбей", "kurazh"]
|
||||
- name: replace
|
||||
args: ["WEBDLRip", "WEBDL"]
|
||||
- name: replace
|
||||
|
|
|
@ -12,6 +12,7 @@ using Jackett.Utils.Clients;
|
|||
using Newtonsoft.Json.Linq;
|
||||
using NLog;
|
||||
using System.Text.RegularExpressions;
|
||||
using Jackett.Models.IndexerConfig.Bespoke;
|
||||
|
||||
namespace Jackett.Indexers
|
||||
{
|
||||
|
@ -25,9 +26,9 @@ namespace Jackett.Indexers
|
|||
protected string cap_sid = null;
|
||||
protected string cap_code_field = null;
|
||||
|
||||
private new ConfigurationDataCaptchaLogin configData
|
||||
private new ConfigurationDataRutracker configData
|
||||
{
|
||||
get { return (ConfigurationDataCaptchaLogin)base.configData; }
|
||||
get { return (ConfigurationDataRutracker)base.configData; }
|
||||
set { base.configData = value; }
|
||||
}
|
||||
|
||||
|
@ -40,7 +41,7 @@ namespace Jackett.Indexers
|
|||
client: wc,
|
||||
logger: l,
|
||||
p: ps,
|
||||
configData: new ConfigurationDataCaptchaLogin())
|
||||
configData: new ConfigurationDataRutracker())
|
||||
{
|
||||
Encoding = Encoding.GetEncoding("windows-1251");
|
||||
Language = "ru-ru";
|
||||
|
@ -1587,6 +1588,11 @@ namespace Jackett.Indexers
|
|||
|
||||
release.Title = title;
|
||||
}
|
||||
else if (configData.StripRussianLetters.Value)
|
||||
{
|
||||
var regex = new Regex(@"(\([А-Яа-я\W]+\))|(^[А-Яа-я\W\d]+\/ )|([а-яА-Я \-]+,+)|([а-яА-Я]+)");
|
||||
release.Title = regex.Replace(release.Title, "");
|
||||
}
|
||||
|
||||
releases.Add(release);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Jackett.Models.IndexerConfig.Bespoke
|
||||
{
|
||||
class ConfigurationDataRutracker : ConfigurationDataCaptchaLogin
|
||||
{
|
||||
public BoolItem StripRussianLetters { get; private set; }
|
||||
|
||||
public ConfigurationDataRutracker()
|
||||
: base()
|
||||
{
|
||||
StripRussianLetters = new BoolItem() { Name = "Strip Russian Letters", Value = true };
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue