1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-03-05 13:20:20 -05:00

New: Parse 'F1RST' releases as Korean

This commit is contained in:
Harry Kim
2025-11-05 19:32:00 -08:00
committed by GitHub
parent a85419df15
commit 4f7425086e
2 changed files with 4 additions and 1 deletions

View File

@@ -31,6 +31,9 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("My Only Series Title.E37.190120.1080p-NEXT.mp4", "My Only Series Title", 37, "2019-01-20")]
[TestCase("Series.E191.190121.720p-NEXT.mp4", "Series", 191, "2019-01-21")]
[TestCase("The Series Title Challenge.E932.190120.720p-NEXT.mp4", "The Series Title Challenge", 932, "2019-01-20")]
[TestCase("백번의 추억.E12.251019.1080p-F1RST", "백번의 추억", 12, "2025-01-19")]
[TestCase("나는 SOLO <나는 솔로>.E223.251015.1080p-F1RST", "나는 SOLO 나는 솔로", 223, "2025-10-15")]
[TestCase("나는 SOLO 그 후, 사랑은 계속된다(나솔사계).E135.251016.1080p-F1RST", "나는 SOLO 그 후, 사랑은 계속된다(나솔사계)", 135, "2025-10-16")]
// [TestCase("", "", 0, "")]
public void should_parse_korean_series_episode(string postTitle, string title, int episodeNumber, string airdate)

View File

@@ -9,7 +9,7 @@ internal static class ParserCommon
internal static readonly RegexReplace[] PreSubstitutionRegex = new[]
{
// 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}\.(.*-(F1RST|NEXT))$", ".S01E$1.$2", RegexOptions.Compiled),
// Some Chinese anime releases contain both English and Chinese titles, remove the Chinese title and replace with normal anime pattern
new RegexReplace(@"^\[(?:(?<subgroup>[^\]]+?)(?:[\u4E00-\u9FCC]+)?)\]\[(?<title>[^\]]+?)(?:\s(?<chinesetitle>[\u4E00-\u9FCC][^\]]*?))\]\[(?:(?:[\u4E00-\u9FCC]+?)?(?<episode>\d{1,4})(?:[\u4E00-\u9FCC]+?)?)\]", "[${subgroup}] ${title} - ${episode} - ", RegexOptions.Compiled),