You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jellyfin/MediaBrowser.Controller/Entities/Audio/IHasAlbumArtist.cs

38 lines
850 B

#pragma warning disable CS1591
using System.Collections.Generic;
6 years ago
namespace MediaBrowser.Controller.Entities.Audio
{
public interface IHasAlbumArtist
{
IReadOnlyList<string> AlbumArtists { get; set; }
6 years ago
}
public interface IHasArtist
{
/// <summary>
/// Gets or sets the artists.
/// </summary>
/// <value>The artists.</value>
IReadOnlyList<string> Artists { get; set; }
}
public static class Extentions
{
public static IEnumerable<string> GetAllArtists<T>(this T item)
where T : IHasArtist, IHasAlbumArtist
{
foreach (var i in item.AlbumArtists)
{
yield return i;
}
6 years ago
foreach (var i in item.Artists)
{
yield return i;
}
}
6 years ago
}
}