aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Dto
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-07-16 15:10:57 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-07-16 15:10:57 -0400
commit61c7c5a9fcc93575c2463dbf03849f720560c105 (patch)
tree712cca9bc47e67f537dc090940ad8f1bdcb61997 /MediaBrowser.Controller/Dto
parent2c22db8b8d42e42a0575e0c2d9366f47f9ee7a24 (diff)
Added AlbumId and AlbumPrimaryImageTag
Diffstat (limited to 'MediaBrowser.Controller/Dto')
-rw-r--r--MediaBrowser.Controller/Dto/DtoBuilder.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Dto/DtoBuilder.cs b/MediaBrowser.Controller/Dto/DtoBuilder.cs
index 16b708a58e..0f5a7409e4 100644
--- a/MediaBrowser.Controller/Dto/DtoBuilder.cs
+++ b/MediaBrowser.Controller/Dto/DtoBuilder.cs
@@ -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;