diff options
| author | Fredrik Lindberg <fli@shapeshifter.se> | 2021-08-26 20:01:56 +0200 |
|---|---|---|
| committer | Fredrik Lindberg <fli@shapeshifter.se> | 2021-09-13 17:59:33 +0200 |
| commit | ea439c5ccf7a61157544accd60109afc12dbc2d2 (patch) | |
| tree | 0da06983169048f5136861bfe10dc423090b0f11 /Emby.Server.Implementations/Library/Resolvers | |
| parent | e15fea5dade9478d9667399eb0c245917d3e1513 (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.Server.Implementations/Library/Resolvers')
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs b/Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs index a1562abd3..a997584a6 100644 --- a/Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs @@ -55,6 +55,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV return null; } + var seriesInfo = Naming.TV.SeriesResolver.Resolve(_libraryManager.GetNamingOptions(), args.Path); + var collectionType = args.GetCollectionType(); if (string.Equals(collectionType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase)) { @@ -64,7 +66,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV return new Series { Path = args.Path, - Name = Path.GetFileName(args.Path) + Name = seriesInfo.Name }; } } @@ -81,7 +83,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV return new Series { Path = args.Path, - Name = Path.GetFileName(args.Path) + Name = seriesInfo.Name }; } @@ -95,7 +97,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV return new Series { Path = args.Path, - Name = Path.GetFileName(args.Path) + Name = seriesInfo.Name }; } } |
