2013-05-12 14:06:08 +00:00
|
|
|
|
using MediaBrowser.Controller.Entities.Audio;
|
|
|
|
|
using MediaBrowser.Controller.Library;
|
|
|
|
|
using MediaBrowser.Controller.Resolvers;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Class MusicAlbumDiscResolver
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class MusicAlbumDiscResolver : ItemResolver<MusicAlbumDisc>
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the priority.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The priority.</value>
|
|
|
|
|
public override ResolverPriority Priority
|
|
|
|
|
{
|
2013-05-14 13:49:55 +00:00
|
|
|
|
get { return ResolverPriority.Second; } // we need to be ahead of the generic folder resolver but behind the movie one
|
2013-05-12 14:06:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Resolves the specified args.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="args">The args.</param>
|
|
|
|
|
/// <returns>MusicAlbum.</returns>
|
|
|
|
|
protected override MusicAlbumDisc Resolve(ItemResolveArgs args)
|
|
|
|
|
{
|
|
|
|
|
if (!args.IsDirectory) return null;
|
|
|
|
|
|
|
|
|
|
return args.Parent is MusicAlbum ? new MusicAlbumDisc() : null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|