2013-02-21 01:33:05 +00:00
|
|
|
|
using MediaBrowser.Controller.Library;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Resolvers.Audio
|
|
|
|
|
{
|
2013-02-23 07:57:11 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Class AudioResolver
|
|
|
|
|
/// </summary>
|
2013-02-21 01:33:05 +00:00
|
|
|
|
public class AudioResolver : BaseItemResolver<Entities.Audio.Audio>
|
|
|
|
|
{
|
2013-02-23 07:57:11 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the priority.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The priority.</value>
|
2013-02-21 01:33:05 +00:00
|
|
|
|
public override ResolverPriority Priority
|
|
|
|
|
{
|
|
|
|
|
get { return ResolverPriority.Last; }
|
|
|
|
|
}
|
2013-02-23 07:57:11 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Resolves the specified args.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="args">The args.</param>
|
|
|
|
|
/// <returns>Entities.Audio.Audio.</returns>
|
2013-02-21 01:33:05 +00:00
|
|
|
|
protected override Entities.Audio.Audio Resolve(ItemResolveArgs args)
|
|
|
|
|
{
|
|
|
|
|
// Return audio if the path is a file and has a matching extension
|
|
|
|
|
|
|
|
|
|
if (!args.IsDirectory)
|
|
|
|
|
{
|
|
|
|
|
if (EntityResolutionHelper.IsAudioFile(args))
|
|
|
|
|
{
|
|
|
|
|
return new Entities.Audio.Audio();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|