add parsing for date with spaces, fix for underscores

This commit is contained in:
scatter-dev 2023-07-28 09:54:28 -04:00
parent db347eb7d8
commit 2b5774ccf3

View File

@ -318,22 +318,24 @@ namespace Emby.Naming.Common
new EpisodeExpression(@"[\._ -]()[Ee][Pp]_?([0-9]+)([^\\/]*)$"),
// <!-- foo.E01., foo.e01. -->
new EpisodeExpression(@"[^\\/]*?()\.?[Ee]([0-9]+)\.([^\\/]*)$"),
new EpisodeExpression("(?<year>[0-9]{4})[\\.-](?<month>[0-9]{2})[\\.-](?<day>[0-9]{2})", true)
new EpisodeExpression("(?<year>[0-9]{4})[\\.-_ ](?<month>[0-9]{2})[\\.-_ ](?<day>[0-9]{2})", true)
{
DateTimeFormats = new[]
{
"yyyy.MM.dd",
"yyyy-MM-dd",
"yyyy_MM_dd"
"yyyy_MM_dd",
"yyyy MM dd"
}
},
new EpisodeExpression(@"(?<day>[0-9]{2})[.-](?<month>[0-9]{2})[.-](?<year>[0-9]{4})", true)
new EpisodeExpression(@"(?<day>[0-9]{2})[.-_ ](?<month>[0-9]{2})[.-_ ](?<year>[0-9]{4})", true)
{
DateTimeFormats = new[]
{
"dd.MM.yyyy",
"dd-MM-yyyy",
"dd_MM_yyyy"
"dd_MM_yyyy",
"dd MM yyyy"
}
},