IHasAlbumArtist.cs 762 B

1234567891011121314151617181920212223242526272829
  1. using MediaBrowser.Controller.Library;
  2. using System.Collections.Generic;
  3. namespace MediaBrowser.Controller.Entities.Audio
  4. {
  5. public interface IHasAlbumArtist
  6. {
  7. List<string> AlbumArtists { get; set; }
  8. }
  9. public interface IHasArtist
  10. {
  11. List<string> AllArtists { get; }
  12. List<string> Artists { get; set; }
  13. }
  14. public static class HasArtistExtensions
  15. {
  16. public static bool HasArtist(this IHasArtist hasArtist, string artist)
  17. {
  18. return NameExtensions.EqualsAny(hasArtist.Artists, artist);
  19. }
  20. public static bool HasAnyArtist(this IHasArtist hasArtist, string artist)
  21. {
  22. return NameExtensions.EqualsAny(hasArtist.AllArtists, artist);
  23. }
  24. }
  25. }