2015-03-13 13:25:28 -04:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
2014-04-06 22:10:38 -04:00
|
|
|
|
|
2013-09-06 15:17:15 -04:00
|
|
|
|
namespace MediaBrowser.Controller.Entities.Audio
|
|
|
|
|
|
{
|
|
|
|
|
|
public interface IHasAlbumArtist
|
|
|
|
|
|
{
|
2014-06-23 12:05:19 -04:00
|
|
|
|
List<string> AlbumArtists { get; set; }
|
2013-09-06 15:17:15 -04:00
|
|
|
|
}
|
2013-09-10 14:56:00 -04:00
|
|
|
|
|
|
|
|
|
|
public interface IHasArtist
|
|
|
|
|
|
{
|
2014-04-06 22:10:38 -04:00
|
|
|
|
List<string> AllArtists { get; }
|
2014-09-04 23:48:53 -04:00
|
|
|
|
|
2015-03-13 13:25:28 -04:00
|
|
|
|
List<string> Artists { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static class HasArtistExtensions
|
|
|
|
|
|
{
|
|
|
|
|
|
public static bool HasArtist(this IHasArtist hasArtist, string artist)
|
|
|
|
|
|
{
|
|
|
|
|
|
return hasArtist.Artists.Contains(artist, StringComparer.OrdinalIgnoreCase);
|
|
|
|
|
|
}
|
|
|
|
|
|
public static bool HasAnyArtist(this IHasArtist hasArtist, string artist)
|
|
|
|
|
|
{
|
|
|
|
|
|
return hasArtist.AllArtists.Contains(artist, StringComparer.OrdinalIgnoreCase);
|
|
|
|
|
|
}
|
2013-09-10 14:56:00 -04:00
|
|
|
|
}
|
2013-09-06 15:17:15 -04:00
|
|
|
|
}
|