From 0b1c9751e5fd93a730e1d836d71ab45c614f6c4f Mon Sep 17 00:00:00 2001 From: Andy Simons Date: Fri, 16 Feb 2018 00:25:52 +0500 Subject: [PATCH] Lostfilm: new series regex (#2586) resolves #2585 * 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 * lostfilm: new series regex * lostfilm: add tracker name into title --- src/Jackett.Common/Indexers/LostFilm.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Jackett.Common/Indexers/LostFilm.cs b/src/Jackett.Common/Indexers/LostFilm.cs index 0b3cf226f..6458550f9 100644 --- a/src/Jackett.Common/Indexers/LostFilm.cs +++ b/src/Jackett.Common/Indexers/LostFilm.cs @@ -22,7 +22,7 @@ namespace Jackett.Indexers { class LostFilm : BaseWebIndexer { - private static Regex parsePlayEpisodeRegex = new Regex("PlayEpisode\\('(?\\d+)','(?\\d+)','(?\\d+)'\\)", RegexOptions.Compiled | RegexOptions.IgnoreCase); + private static Regex parsePlayEpisodeRegex = new Regex("PlayEpisode\\('(?\\d{1,3})(?\\d{3})(?\\d{3})'\\)", RegexOptions.Compiled | RegexOptions.IgnoreCase); private static Regex parseReleaseDetailsRegex = new Regex("Видео:\\ (?.+).\\ Размер:\\ (?.+).\\ Перевод", RegexOptions.Compiled | RegexOptions.IgnoreCase); // http://www.lostfilm.tv/login @@ -54,9 +54,9 @@ namespace Jackett.Indexers var trigger = button.GetAttribute("onclick"); var match = parsePlayEpisodeRegex.Match(trigger); - seriesId = match.Groups["id"].Value; - season = match.Groups["season"].Value; - episode = match.Groups["episode"].Value; + seriesId = match.Groups["id"].Value.TrimStart('0'); + season = match.Groups["season"].Value.TrimStart('0'); + episode = match.Groups["episode"].Value.TrimStart('0'); } internal string GetEpisodeString() @@ -612,7 +612,7 @@ namespace Jackett.Indexers quality = Regex.Replace(quality, "720 ", "720p ", RegexOptions.IgnoreCase); var techComponents = new string[] { - "rus", quality + "rus", quality, "(LostFilm)" }; var techInfo = string.Join(" ", techComponents.Where(s => !string.IsNullOrEmpty(s)));