MusicVideo.cs 1.2 KB

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