Added AlbumId and AlbumPrimaryImageTag

This commit is contained in:
Luke Pulverenti 2013-07-16 15:10:57 -04:00
parent 2c22db8b8d
commit 61c7c5a9fc
2 changed files with 25 additions and 0 deletions

View File

@ -591,6 +591,20 @@ namespace MediaBrowser.Controller.Dto
dto.Album = audio.Album;
dto.AlbumArtist = audio.AlbumArtist;
dto.Artists = new[] { audio.Artist };
var albumParent = audio.FindParent<MusicAlbum>();
if (albumParent != null)
{
dto.AlbumId = GetClientItemId(albumParent);
var imagePath = albumParent.PrimaryImagePath;
if (!string.IsNullOrEmpty(imagePath))
{
dto.AlbumPrimaryImageTag = GetImageCacheTag(albumParent, ImageType.Primary, imagePath);
}
}
}
var album = item as MusicAlbum;

View File

@ -348,6 +348,17 @@ namespace MediaBrowser.Model.Dto
/// <value>The album.</value>
public string Album { get; set; }
/// <summary>
/// Gets or sets the album id.
/// </summary>
/// <value>The album id.</value>
public string AlbumId { get; set; }
/// <summary>
/// Gets or sets the album image tag.
/// </summary>
/// <value>The album image tag.</value>
public Guid? AlbumPrimaryImageTag { get; set; }
/// <summary>
/// Gets or sets the album artist.
/// </summary>