The Free Software Media System - Server Backend & API
Remove broken CleanDateTimes regex
crobiberof512d5167dd3
diff --git a/Emby.Naming/Common/NamingOptions.cs b/Emby.Naming/Common/NamingOptions.csindex 316ed9f891..035d1b2280 100644--- a/Emby.Naming/Common/NamingOptions.cs+++ b/Emby.Naming/Common/NamingOptions.cs@@ -132,9 +132,7 @@ namespace Emby.Naming.CommonCleanDateTimes = new[]{@"(.+[^_\,\.\(\)\[\]\-])[_\.\(\)\[\]\-](19[0-9]{2}|20[0-9]{2})(?![0-9]+|\W[0-9]{2}\W[0-9]{2})([ _\,\.\(\)\[\]\-][^0-9]|).*(19[0-9]{2}|20[0-9]{2})*",- @"(.+[^_\,\.\(\)\[\]\-])[ _\.\(\)\[\]\-]+(19[0-9]{2}|20[0-9]{2})(?![0-9]+|\W[0-9]{2}\W[0-9]{2})([ _\,\.\(\)\[\]\-][^0-9]|).*(19[0-9]{2}|20[0-9]{2})*",- @"(.+\w)\W+\p{Ps}(19[0-9]{2}|20[0-9]{2})\p{Pe}", // Prefer year enclosed in parenthesis (){}[]- @"(.+\w)\W+(19[0-9]{2}|20[0-9]{2})(\W|$)", // Secondary year surrounded by non-word chars+ @"(.+[^_\,\.\(\)\[\]\-])[ _\.\(\)\[\]\-]+(19[0-9]{2}|20[0-9]{2})(?![0-9]+|\W[0-9]{2}\W[0-9]{2})([ _\,\.\(\)\[\]\-][^0-9]|).*(19[0-9]{2}|20[0-9]{2})*"};CleanStrings = new[]diff --git a/tests/Jellyfin.Naming.Tests/Video/VideoResolverTests.cs b/tests/Jellyfin.Naming.Tests/Video/VideoResolverTests.csindex 7d105b084e..b6447a7a64 100644--- a/tests/Jellyfin.Naming.Tests/Video/VideoResolverTests.cs+++ b/tests/Jellyfin.Naming.Tests/Video/VideoResolverTests.cs@@ -147,13 +147,11 @@ namespace Jellyfin.Naming.Tests.Video};yield return new object[]{- new VideoFileInfo()- {- Path = @"/server/Movies/Rain Man 1988 REMASTERED 1080p BluRay x264 AAC - Ozlem/Rain Man 1988 REMASTERED 1080p BluRay x264 AAC - Ozlem.mp4",- Container = "mp4",- Name = "Rain Man",- Year = 1988,- }+ new VideoFileInfo(+ path: @"/server/Movies/Rain Man 1988 REMASTERED 1080p BluRay x264 AAC - Ozlem/Rain Man 1988 REMASTERED 1080p BluRay x264 AAC - Ozlem.mp4",+ container: "mp4",+ name: "Rain Man",+ year: 1988)};}