using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
namespace MediaBrowser.Controller.Entities.Audio
{
///
/// Class MusicAlbum
///
public class MusicAlbum : Folder, IHasAlbumArtist, IHasArtist, IHasMusicGenres, IHasTags, IHasLookupInfo
{
public List SoundtrackIds { get; set; }
public MusicAlbum()
{
Artists = new List();
SoundtrackIds = new List();
Tags = new List();
}
[IgnoreDataMember]
public MusicArtist MusicArtist
{
get
{
return Parents.OfType().FirstOrDefault();
}
}
[IgnoreDataMember]
public List AllArtists
{
get
{
var list = AlbumArtists;
list.AddRange(Artists);
return list;
}
}
[IgnoreDataMember]
public List AlbumArtists
{
get
{
var list = new List();
if (!string.IsNullOrEmpty(AlbumArtist))
{
list.Add(AlbumArtist);
}
return list;
}
set
{
AlbumArtist = value.FirstOrDefault();
}
}
///
/// Gets or sets the tags.
///
/// The tags.
public List Tags { get; set; }
///
/// Gets the tracks.
///
/// The tracks.
public IEnumerable