diff options
| author | Lenart Kos <koslenart@gmail.com> | 2023-02-17 22:40:54 +0100 |
|---|---|---|
| committer | Lenart Kos <koslenart@gmail.com> | 2023-02-17 22:40:54 +0100 |
| commit | 40a1e1924aba735c94a6575e225b8e63524f9714 (patch) | |
| tree | 12ce4d0277525f039aedce8500d7dfd9ec1e30d5 /Emby.Naming | |
| parent | 9979b346ea0392f02922b7cce271f31ccb051987 (diff) | |
Add rule and tests to fix #9341
Add an additional EpisodeExpression that matches
`Series title Season 3 Episode 9 - Episode title.avi` correctly.
Fixes #9341
Diffstat (limited to 'Emby.Naming')
| -rw-r--r-- | Emby.Naming/Common/NamingOptions.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Emby.Naming/Common/NamingOptions.cs b/Emby.Naming/Common/NamingOptions.cs index 54f62a157..b9c98c942 100644 --- a/Emby.Naming/Common/NamingOptions.cs +++ b/Emby.Naming/Common/NamingOptions.cs @@ -338,7 +338,15 @@ namespace Emby.Naming.Common } }, - // This isn't a Kodi naming rule, but the expression below causes false positives, + // This isn't a Kodi naming rule, but the expression below causes false episode numbers for + // Title Season X Episode X naming schemes. + // "Series Season X Episode X - Title.avi", "Series S03 E09.avi", "s3 e9 - Title.avi" + new EpisodeExpression(@".*[\\\/]((?<seriesname>[^\\/]+?)\s)?[Ss](?:eason)?\s*(?<seasonnumber>[0-9]+)\s+[Ee](?:pisode)?\s*(?<epnumber>[0-9]+).*$") + { + IsNamed = true + }, + + // Not a Kodi rule as well, but the expression below also causes false positives, // so we make sure this one gets tested first. // "Foo Bar 889" new EpisodeExpression(@".*[\\\/](?![Ee]pisode)(?<seriesname>[\w\s]+?)\s(?<epnumber>[0-9]{1,4})(-(?<endingepnumber>[0-9]{2,4}))*[^\\\/x]*$") |
