aboutsummaryrefslogtreecommitdiff
path: root/Emby.Naming/Common
diff options
context:
space:
mode:
authorFredrik Lindberg <fli@shapeshifter.se>2021-08-26 20:01:56 +0200
committerFredrik Lindberg <fli@shapeshifter.se>2021-09-13 17:59:33 +0200
commitea439c5ccf7a61157544accd60109afc12dbc2d2 (patch)
tree0da06983169048f5136861bfe10dc423090b0f11 /Emby.Naming/Common
parente15fea5dade9478d9667399eb0c245917d3e1513 (diff)
Improve series name matching
Add a series path resolver that attempts to extract only the series name from a path that contains more information that just the name.
Diffstat (limited to 'Emby.Naming/Common')
-rw-r--r--Emby.Naming/Common/NamingOptions.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/Emby.Naming/Common/NamingOptions.cs b/Emby.Naming/Common/NamingOptions.cs
index 915ce42cc..192171a38 100644
--- a/Emby.Naming/Common/NamingOptions.cs
+++ b/Emby.Naming/Common/NamingOptions.cs
@@ -368,6 +368,20 @@ namespace Emby.Naming.Common
IsOptimistic = true,
IsNamed = true
},
+
+ // Series and season only expression
+ // "the show/season 1", "the show/s01"
+ new EpisodeExpression(@"(.*(\\|\/))*(?<seriesname>.+)\/[Ss](eason)?[\. _\-]*(?<seasonnumber>[0-9]+)")
+ {
+ IsNamed = true
+ },
+
+ // Series and season only expression
+ // "the show S01", "the show season 1"
+ new EpisodeExpression(@"(.*(\\|\/))*(?<seriesname>.+)[\. _\-]+[sS](eason)?[\. _\-]*(?<seasonnumber>[0-9]+)")
+ {
+ IsNamed = true
+ },
};
EpisodeWithoutSeasonExpressions = new[]