From 3369217767b1544ad0a306804d8b8ade6022185d Mon Sep 17 00:00:00 2001 From: Mikal Stordal Date: Mon, 7 Oct 2024 19:46:59 +0200 Subject: [PATCH] fix: start uglifying the year regex for season merging - If you know which show this is for, then good for you. Otherwise you don't need to pay it any mind. --- Shokofin/API/ShokoAPIManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Shokofin/API/ShokoAPIManager.cs b/Shokofin/API/ShokoAPIManager.cs index 2d5fc86d..16be63c3 100644 --- a/Shokofin/API/ShokoAPIManager.cs +++ b/Shokofin/API/ShokoAPIManager.cs @@ -20,7 +20,8 @@ namespace Shokofin.API; public class ShokoAPIManager : IDisposable { - private static readonly Regex YearRegex = new(@"\s+\((?\d{4})\)\s*$", RegexOptions.Compiled); + // Note: This regex will only get uglier with time. + private static readonly Regex YearRegex = new(@"\s+\((?\d{4})(?:dai [2-9] bu)?\)\s*$", RegexOptions.Compiled | RegexOptions.IgnoreCase); private readonly ILogger Logger;