diff --git a/MediaBrowser.Controller/Entities/Audio/Audio.cs b/MediaBrowser.Controller/Entities/Audio/Audio.cs
index 6f4a0c4d2c..139d8c6fb5 100644
--- a/MediaBrowser.Controller/Entities/Audio/Audio.cs
+++ b/MediaBrowser.Controller/Entities/Audio/Audio.cs
@@ -1,4 +1,5 @@
-using MediaBrowser.Model.Configuration;
+using MediaBrowser.Controller.Providers;
+using MediaBrowser.Model.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -9,7 +10,7 @@ namespace MediaBrowser.Controller.Entities.Audio
///
/// Class Audio
///
- public class Audio : BaseItem, IHasMediaStreams, IHasAlbumArtist, IHasArtist, IHasMusicGenres
+ public class Audio : BaseItem, IHasMediaStreams, IHasAlbumArtist, IHasArtist, IHasMusicGenres, IHasLookupInfo
{
public Audio()
{
@@ -127,5 +128,16 @@ namespace MediaBrowser.Controller.Entities.Audio
{
return config.BlockUnratedMusic;
}
+
+ public SongInfo GetLookupInfo()
+ {
+ var info = GetItemLookupInfo();
+
+ info.AlbumArtist = AlbumArtist;
+ info.Album = Album;
+ info.Artists = Artists;
+
+ return info;
+ }
}
}
diff --git a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs
index b3bf0d2b66..6dda902c9e 100644
--- a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs
+++ b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs
@@ -1,4 +1,5 @@
-using MediaBrowser.Model.Configuration;
+using MediaBrowser.Controller.Providers;
+using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities;
using System;
using System.Collections.Generic;
@@ -10,10 +11,10 @@ namespace MediaBrowser.Controller.Entities.Audio
///
/// Class MusicAlbum
///
- public class MusicAlbum : Folder, IHasAlbumArtist, IHasArtist, IHasMusicGenres, IHasTags
+ public class MusicAlbum : Folder, IHasAlbumArtist, IHasArtist, IHasMusicGenres, IHasTags, IHasLookupInfo
{
public List SoundtrackIds { get; set; }
-
+
public MusicAlbum()
{
Artists = new List();
@@ -112,6 +113,26 @@ namespace MediaBrowser.Controller.Entities.Audio
{
return config.BlockUnratedMusic;
}
+
+ public AlbumInfo GetLookupInfo()
+ {
+ var id = GetItemLookupInfo();
+
+ id.AlbumArtist = AlbumArtist;
+
+ var artist = Parents.OfType().FirstOrDefault();
+
+ if (artist != null)
+ {
+ id.ArtistProviderIds = artist.ProviderIds;
+ }
+
+ id.SongInfos = RecursiveChildren.OfType