MusicVideo.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using MediaBrowser.Controller.Entities.Audio;
  2. using MediaBrowser.Model.Entities;
  3. using System;
  4. namespace MediaBrowser.Controller.Entities
  5. {
  6. public class MusicVideo : Video, IHasArtist, IHasMusicGenres
  7. {
  8. /// <summary>
  9. /// Gets or sets the artist.
  10. /// </summary>
  11. /// <value>The artist.</value>
  12. public string Artist { get; set; }
  13. /// <summary>
  14. /// Gets or sets the album.
  15. /// </summary>
  16. /// <value>The album.</value>
  17. public string Album { get; set; }
  18. /// <summary>
  19. /// Determines whether the specified name has artist.
  20. /// </summary>
  21. /// <param name="name">The name.</param>
  22. /// <returns><c>true</c> if the specified name has artist; otherwise, <c>false</c>.</returns>
  23. public bool HasArtist(string name)
  24. {
  25. return string.Equals(Artist, name, StringComparison.OrdinalIgnoreCase);
  26. }
  27. /// <summary>
  28. /// Gets the user data key.
  29. /// </summary>
  30. /// <returns>System.String.</returns>
  31. public override string GetUserDataKey()
  32. {
  33. return this.GetProviderId(MetadataProviders.Tmdb) ?? this.GetProviderId(MetadataProviders.Imdb) ?? base.GetUserDataKey();
  34. }
  35. }
  36. }