Added AlbumId and AlbumPrimaryImageTag
This commit is contained in:
parent
2c22db8b8d
commit
61c7c5a9fc
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue
Block a user