From 3eb4091808735858b01855d298226d239be464af Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 3 Nov 2016 02:37:52 -0400 Subject: move additional classes to new server lib --- .../Library/Resolvers/Audio/AudioResolver.cs | 68 ---------------------- 1 file changed, 68 deletions(-) delete mode 100644 MediaBrowser.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs (limited to 'MediaBrowser.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs') diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs deleted file mode 100644 index 039a17100..000000000 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs +++ /dev/null @@ -1,68 +0,0 @@ -using MediaBrowser.Controller.Library; -using MediaBrowser.Controller.Resolvers; -using MediaBrowser.Model.Entities; -using System; - -namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio -{ - /// - /// Class AudioResolver - /// - public class AudioResolver : ItemResolver - { - private readonly ILibraryManager _libraryManager; - - public AudioResolver(ILibraryManager libraryManager) - { - _libraryManager = libraryManager; - } - - /// - /// Gets the priority. - /// - /// The priority. - public override ResolverPriority Priority - { - get { return ResolverPriority.Last; } - } - - /// - /// Resolves the specified args. - /// - /// The args. - /// Entities.Audio.Audio. - protected override Controller.Entities.Audio.Audio Resolve(ItemResolveArgs args) - { - // Return audio if the path is a file and has a matching extension - - if (!args.IsDirectory) - { - var libraryOptions = args.GetLibraryOptions(); - - if (_libraryManager.IsAudioFile(args.Path, libraryOptions)) - { - var collectionType = args.GetCollectionType(); - - var isMixed = string.IsNullOrWhiteSpace(collectionType); - - // For conflicting extensions, give priority to videos - if (isMixed && _libraryManager.IsVideoFile(args.Path, libraryOptions)) - { - return null; - } - - var isStandalone = args.Parent == null; - - if (isStandalone || - string.Equals(collectionType, CollectionType.Music, StringComparison.OrdinalIgnoreCase) || - isMixed) - { - return new Controller.Entities.Audio.Audio(); - } - } - } - - return null; - } - } -} -- cgit v1.2.3