New: Add support for Lilith-Raws release group

This commit is contained in:
Wu Haotian 2019-09-08 21:29:32 +08:00 committed by Taloth
parent ea65867b23
commit 6ea047dcb4
2 changed files with 3 additions and 2 deletions

View File

@ -40,6 +40,7 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("[喵萌奶茶屋&LoliHouse]/Manaria Friends - 03 [WebRip 1080p HEVC-10bit AAC][]", "Manaria Friends", "&LoliHouse", 3)] [TestCase("[喵萌奶茶屋&LoliHouse]/Manaria Friends - 03 [WebRip 1080p HEVC-10bit AAC][]", "Manaria Friends", "&LoliHouse", 3)]
[TestCase("[悠哈璃羽字幕社&拉斯观测组&LoliHouse] : Alicization / Sword Art Online: Alicization - 17 [WebRip 1080p HEVC-10bit AAC][]", "Sword Art Online Alicization", "&&LoliHouse", 17)] [TestCase("[悠哈璃羽字幕社&拉斯观测组&LoliHouse] : Alicization / Sword Art Online: Alicization - 17 [WebRip 1080p HEVC-10bit AAC][]", "Sword Art Online Alicization", "&&LoliHouse", 17)]
[TestCase("[ZERO字幕組]·Jingai-san no Yome[11][BIG5][1080p]", "Jingai-san no Yome", "ZERO字幕組", 11)] [TestCase("[ZERO字幕組]·Jingai-san no Yome[11][BIG5][1080p]", "Jingai-san no Yome", "ZERO字幕組", 11)]
[TestCase("[Lilith-Raws] II 簿 - Grace note- / Lord El-Melloi II Case Files - 04 [BiliBili][WEB-DL][1080p][AVC AAC][CHT][MKV]", "Lord El-Melloi II Case Files", "Lilith-Raws", 4)]
public void should_parse_unbracketed_chinese_anime_releases(string postTitle, string title, string subgroup, int absoluteEpisodeNumber) public void should_parse_unbracketed_chinese_anime_releases(string postTitle, string title, string subgroup, int absoluteEpisodeNumber)
{ {
postTitle = XmlCleaner.ReplaceUnicode(postTitle); postTitle = XmlCleaner.ReplaceUnicode(postTitle);

View File

@ -22,8 +22,8 @@ namespace NzbDrone.Core.Parser
// Korean series without season number, replace with S01Exxx and remove airdate // Korean series without season number, replace with S01Exxx and remove airdate
new RegexReplace(@"\.E(\d{2,4})\.\d{6}\.(.*-NEXT)$", ".S01E$1.$2", RegexOptions.Compiled), new RegexReplace(@"\.E(\d{2,4})\.\d{6}\.(.*-NEXT)$", ".S01E$1.$2", RegexOptions.Compiled),
// Chinese LoliHouse/ZERO releases don't use the expected brackets, normalize using brackets // Chinese LoliHouse/ZERO/Lilith-Raws releases don't use the expected brackets, normalize using brackets
new RegexReplace(@"^\[(?<subgroup>[^\]]*?(?:LoliHouse|ZERO)[^\]]*?)\](?<title>[^\[\]]+?)(?: - (?<episode>[0-9-]+)\s*|\[第?(?<episode>[0-9]+(?:-[0-9]+)?)话?(?:END|完)?\])\[", "[${subgroup}][${title}][${episode}][", RegexOptions.Compiled), new RegexReplace(@"^\[(?<subgroup>[^\]]*?(?:LoliHouse|ZERO|Lilith-Raws)[^\]]*?)\](?<title>[^\[\]]+?)(?: - (?<episode>[0-9-]+)\s*|\[第?(?<episode>[0-9]+(?:-[0-9]+)?)话?(?:END|完)?\])\[", "[${subgroup}][${title}][${episode}][", RegexOptions.Compiled),
// Most Chinese anime releases contain additional brackets/separators for chinese and non-chinese titles, remove junk and replace with normal anime pattern // Most Chinese anime releases contain additional brackets/separators for chinese and non-chinese titles, remove junk and replace with normal anime pattern
new RegexReplace(@"^\[(?<subgroup>[^\]]+)\](?:\s?★[^\[ -]+\s?)?\[(?:(?<chinesetitle>[^\]]+?)(?:\]\[|[_/·]\s*))?(?<title>[^\]]+?)\](?:\[\d{4}\])?\[第?(?<episode>[0-9]+(?:-[0-9]+)?)话?(?:END|完)?\]", "[${subgroup}] ${title} - ${episode} ", RegexOptions.Compiled) new RegexReplace(@"^\[(?<subgroup>[^\]]+)\](?:\s?★[^\[ -]+\s?)?\[(?:(?<chinesetitle>[^\]]+?)(?:\]\[|[_/·]\s*))?(?<title>[^\]]+?)\](?:\[\d{4}\])?\[第?(?<episode>[0-9]+(?:-[0-9]+)?)话?(?:END|完)?\]", "[${subgroup}] ${title} - ${episode} ", RegexOptions.Compiled)