diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2019-11-17 13:55:27 -0500 |
|---|---|---|
| committer | Joshua Boniface <joshua@boniface.me> | 2019-11-24 13:37:23 -0500 |
| commit | 2de763eef9a46d77faf98801feff8fc335719eab (patch) | |
| tree | 2b1026bc8f70844e6c81c7f8d750a2f936c12b2f /Emby.Naming | |
| parent | 46ab046c344f036f5c0ceea410c39a8a540b67fc (diff) | |
Merge pull request #1992 from Bond-009/namingtests
Fix naming tests
(cherry picked from commit 78e0afae2fba48212dab2986818b5156868592fb)
Signed-off-by: Joshua Boniface <joshua@boniface.me>
Diffstat (limited to 'Emby.Naming')
| -rw-r--r-- | Emby.Naming/Common/NamingOptions.cs | 15 | ||||
| -rw-r--r-- | Emby.Naming/Emby.Naming.csproj | 7 |
2 files changed, 16 insertions, 6 deletions
diff --git a/Emby.Naming/Common/NamingOptions.cs b/Emby.Naming/Common/NamingOptions.cs index 9cf430daf..d37be0e63 100644 --- a/Emby.Naming/Common/NamingOptions.cs +++ b/Emby.Naming/Common/NamingOptions.cs @@ -311,6 +311,14 @@ namespace Emby.Naming.Common } }, + // This isn't a Kodi naming rule, but the expression below causes false positives, + // so we make sure this one gets tested first. + // "Foo Bar 889" + new EpisodeExpression(@".*[\\\/](?![Ee]pisode)(?<seriesname>(\w+\s*?)*)\s(?<epnumber>\d{1,3})(-(?<endingepnumber>\d{2,3}))*[^\\\/]*$") + { + IsNamed = true + }, + new EpisodeExpression("[\\\\/\\._ \\[\\(-]([0-9]+)x([0-9]+(?:(?:[a-i]|\\.[1-9])(?![0-9]))?)([^\\\\/]*)$") { SupportsAbsoluteEpisodeNumbers = true @@ -328,9 +336,10 @@ namespace Emby.Naming.Common // *** End Kodi Standard Naming - // [bar] Foo - 1 [baz] - new EpisodeExpression(@".*?(\[.*?\])+.*?(?<seriesname>(\w+\s)+?)[-\s_]+(?<epnumber>\d+).*$"){ - IsNamed=false, + // [bar] Foo - 1 [baz] + new EpisodeExpression(@".*?(\[.*?\])+.*?(?<seriesname>(\w+\s*?)+?)[-\s_]+(?<epnumber>\d+).*$") + { + IsNamed = true }, new EpisodeExpression(@".*(\\|\/)[sS]?(?<seasonnumber>\d+)[xX](?<epnumber>\d+)[^\\\/]*$") { diff --git a/Emby.Naming/Emby.Naming.csproj b/Emby.Naming/Emby.Naming.csproj index 0b1ce2fce..0e3bd3fac 100644 --- a/Emby.Naming/Emby.Naming.csproj +++ b/Emby.Naming/Emby.Naming.csproj @@ -23,9 +23,10 @@ <!-- Code analysers--> <ItemGroup Condition=" '$(Configuration)' == 'Debug' "> - <PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.4" /> - <PackageReference Include="StyleCop.Analyzers" Version="1.1.118" /> - <PackageReference Include="SerilogAnalyzer" Version="0.15.0" /> + <PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.4" PrivateAssets="All" /> + <PackageReference Include="SerilogAnalyzer" Version="0.15.0" PrivateAssets="All" /> + <PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" /> + <PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" PrivateAssets="All" /> </ItemGroup> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> |
