diff options
| author | Orry Verducci <orry@orryverducci.co.uk> | 2021-12-01 22:13:52 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-01 22:13:52 +0000 |
| commit | e446e9fde935ad5744500e6efaab8fcacf89b600 (patch) | |
| tree | 9012e91423660bf4bc9992f06cf26f53e826fb65 /Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs | |
| parent | 9abe9e7e54cc454667ba2128b5d321631b5ece51 (diff) | |
| parent | f6d8c19a7ac41c6c7c217d9e9ccbf98f78122327 (diff) | |
Merge branch 'master' into mbaff-interlace-detection
Diffstat (limited to 'Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs b/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs index bc5b4499f..29758a078 100644 --- a/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs +++ b/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs @@ -1,8 +1,9 @@ using System; using System.IO; +using Emby.Naming.Audio; +using Emby.Naming.Common; using MediaBrowser.Controller; using MediaBrowser.Controller.Entities; -using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Resolvers; using MediaBrowser.Model.IO; @@ -13,17 +14,17 @@ namespace Emby.Server.Implementations.Library /// </summary> public class CoreResolutionIgnoreRule : IResolverIgnoreRule { - private readonly ILibraryManager _libraryManager; + private readonly NamingOptions _namingOptions; private readonly IServerApplicationPaths _serverApplicationPaths; /// <summary> /// Initializes a new instance of the <see cref="CoreResolutionIgnoreRule"/> class. /// </summary> - /// <param name="libraryManager">The library manager.</param> + /// <param name="namingOptions">The naming options.</param> /// <param name="serverApplicationPaths">The server application paths.</param> - public CoreResolutionIgnoreRule(ILibraryManager libraryManager, IServerApplicationPaths serverApplicationPaths) + public CoreResolutionIgnoreRule(NamingOptions namingOptions, IServerApplicationPaths serverApplicationPaths) { - _libraryManager = libraryManager; + _namingOptions = namingOptions; _serverApplicationPaths = serverApplicationPaths; } @@ -78,7 +79,7 @@ namespace Emby.Server.Implementations.Library { // Don't resolve these into audio files if (Path.GetFileNameWithoutExtension(filename.AsSpan()).Equals(BaseItem.ThemeSongFileName, StringComparison.Ordinal) - && _libraryManager.IsAudioFile(filename)) + && AudioFileParser.IsAudioFile(filename, _namingOptions)) { return true; } |
