using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Resolvers;
namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio
{
///
/// Class MusicAlbumDiscResolver
///
public class MusicAlbumDiscResolver : ItemResolver
{
///
/// Gets the priority.
///
/// The priority.
public override ResolverPriority Priority
{
get { return ResolverPriority.Second; } // we need to be ahead of the generic folder resolver but behind the movie one
}
///
/// Resolves the specified args.
///
/// The args.
/// MusicAlbum.
protected override MusicAlbumDisc Resolve(ItemResolveArgs args)
{
if (!args.IsDirectory) return null;
return args.Parent is MusicAlbum ? new MusicAlbumDisc
{
DisplayMediaType = "Disc"
} : null;
}
}
}