From ffd9460d51980a550ef5460e5df4e942b63077a7 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 23 Jul 2015 12:32:34 -0400 Subject: add hdhomerun auto-discovery --- .../Library/Resolvers/TV/SeriesResolver.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Library') diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs index 70ab105b2..f12022dc7 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs +++ b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs @@ -125,7 +125,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV if ((attributes & FileAttributes.Directory) == FileAttributes.Directory) { - if (IsSeasonFolder(child.FullName, isTvContentType)) + if (IsSeasonFolder(child.FullName, isTvContentType, libraryManager)) { //logger.Debug("{0} is a series because of season folder {1}.", path, child.FullName); return true; @@ -188,10 +188,13 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV /// /// The path. /// if set to true [is tv content type]. + /// The library manager. /// true if [is season folder] [the specified path]; otherwise, false. - private static bool IsSeasonFolder(string path, bool isTvContentType) + private static bool IsSeasonFolder(string path, bool isTvContentType, ILibraryManager libraryManager) { - var seasonNumber = new SeasonPathParser(new ExtendedNamingOptions(), new RegexProvider()).Parse(path, isTvContentType, isTvContentType).SeasonNumber; + var namingOptions = ((LibraryManager)libraryManager).GetNamingOptions(); + + var seasonNumber = new SeasonPathParser(namingOptions, new RegexProvider()).Parse(path, isTvContentType, isTvContentType).SeasonNumber; return seasonNumber.HasValue; } -- cgit v1.2.3