|
|
|
@ -176,7 +176,7 @@ namespace MediaBrowser.Controller.Dto
|
|
|
|
|
|
|
|
|
|
if (item.IsFolder && fields.Contains(ItemFields.DisplayPreferencesId))
|
|
|
|
|
{
|
|
|
|
|
dto.DisplayPreferencesId = ((Folder) item).GetDisplayPreferencesId(user.Id).ToString();
|
|
|
|
|
dto.DisplayPreferencesId = ((Folder)item).GetDisplayPreferencesId(user.Id).ToString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (item.IsFolder)
|
|
|
|
@ -424,7 +424,7 @@ namespace MediaBrowser.Controller.Dto
|
|
|
|
|
{
|
|
|
|
|
dto.Album = audio.Album;
|
|
|
|
|
dto.AlbumArtist = audio.AlbumArtist;
|
|
|
|
|
dto.Artist = audio.Artist;
|
|
|
|
|
dto.Artists = new[] { audio.Artist };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var album = item as MusicAlbum;
|
|
|
|
@ -434,7 +434,12 @@ namespace MediaBrowser.Controller.Dto
|
|
|
|
|
var songs = album.Children.OfType<Audio>().ToList();
|
|
|
|
|
|
|
|
|
|
dto.AlbumArtist = songs.Select(i => i.AlbumArtist).FirstOrDefault(i => !string.IsNullOrEmpty(i));
|
|
|
|
|
dto.Artist = songs.Select(i => i.Artist).FirstOrDefault(i => !string.IsNullOrEmpty(i));
|
|
|
|
|
|
|
|
|
|
dto.Artists =
|
|
|
|
|
songs.Select(i => i.Artist ?? string.Empty)
|
|
|
|
|
.Where(i => !string.IsNullOrEmpty(i))
|
|
|
|
|
.Distinct(StringComparer.OrdinalIgnoreCase)
|
|
|
|
|
.ToArray();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|