MusicVideo.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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, IHasBudget
  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. /// Gets or sets the budget.
  20. /// </summary>
  21. /// <value>The budget.</value>
  22. public double? Budget { get; set; }
  23. /// <summary>
  24. /// Gets or sets the revenue.
  25. /// </summary>
  26. /// <value>The revenue.</value>
  27. public double? Revenue { get; set; }
  28. /// <summary>
  29. /// Determines whether the specified name has artist.
  30. /// </summary>
  31. /// <param name="name">The name.</param>
  32. /// <returns><c>true</c> if the specified name has artist; otherwise, <c>false</c>.</returns>
  33. public bool HasArtist(string name)
  34. {
  35. return string.Equals(Artist, name, StringComparison.OrdinalIgnoreCase);
  36. }
  37. /// <summary>
  38. /// Gets the user data key.
  39. /// </summary>
  40. /// <returns>System.String.</returns>
  41. public override string GetUserDataKey()
  42. {
  43. return this.GetProviderId(MetadataProviders.Tmdb) ?? this.GetProviderId(MetadataProviders.Imdb) ?? base.GetUserDataKey();
  44. }
  45. }
  46. }