From 30e1d3aa11b89442aa20a4818382033d40d7e84e Mon Sep 17 00:00:00 2001 From: pcjones Date: Sun, 22 Sep 2024 21:14:35 +0200 Subject: [PATCH] Fix season matching pattern to match up to 4 digit seasons/episodes --- UmlautAdaptarr/Services/TitleMatchingService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UmlautAdaptarr/Services/TitleMatchingService.cs b/UmlautAdaptarr/Services/TitleMatchingService.cs index 4d1101e..2eb7dc2 100644 --- a/UmlautAdaptarr/Services/TitleMatchingService.cs +++ b/UmlautAdaptarr/Services/TitleMatchingService.cs @@ -196,9 +196,9 @@ namespace UmlautAdaptarr.Services // Workaround for the rare case of e.g. "Frieren: Beyond Journey's End" that also has the alias "Frieren" if (expectedTitle!.StartsWith(variation, StringComparison.OrdinalIgnoreCase)) { - // See if we already matched the whole title by checking if S01E01 pattern is coming next to avoid false positives + // See if we already matched the whole title by checking if S01E01/S2024E123 pattern is coming next to avoid false positives // - that won't help with movies but with tv shows - var seasonMatchingPattern = $"^{separator}S\\d{{1,2}}E\\d{{1,2}}"; + var seasonMatchingPattern = $"^{separator}S\\d{{1,4}}E\\d{{1,4}}"; if (!Regex.IsMatch(suffix, seasonMatchingPattern)) { logger.LogWarning($"TitleMatchingService - Didn't rename: '{originalTitle}' because the expected title '{expectedTitle}' starts with the variation '{variation}'");