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.
This commit is contained in:
Fredrik Lindberg
2021-08-26 20:01:56 +02:00
parent e15fea5dad
commit ea439c5ccf
8 changed files with 233 additions and 3 deletions

View File

@@ -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
};
}
}