MusicVideo.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using MediaBrowser.Controller.Entities.Audio;
  2. using MediaBrowser.Model.Configuration;
  3. using MediaBrowser.Model.Entities;
  4. using System;
  5. namespace MediaBrowser.Controller.Entities
  6. {
  7. public class MusicVideo : Video, IHasArtist, IHasMusicGenres, IHasBudget
  8. {
  9. /// <summary>
  10. /// Gets or sets the artist.
  11. /// </summary>
  12. /// <value>The artist.</value>
  13. public string Artist { get; set; }
  14. /// <summary>
  15. /// Gets or sets the album.
  16. /// </summary>
  17. /// <value>The album.</value>
  18. public string Album { get; set; }
  19. /// <summary>
  20. /// Gets or sets the budget.
  21. /// </summary>
  22. /// <value>The budget.</value>
  23. public double? Budget { get; set; }
  24. /// <summary>
  25. /// Gets or sets the revenue.
  26. /// </summary>
  27. /// <value>The revenue.</value>
  28. public double? Revenue { get; set; }
  29. /// <summary>
  30. /// Determines whether the specified name has artist.
  31. /// </summary>
  32. /// <param name="name">The name.</param>
  33. /// <returns><c>true</c> if the specified name has artist; otherwise, <c>false</c>.</returns>
  34. public bool HasArtist(string name)
  35. {
  36. return string.Equals(Artist, name, StringComparison.OrdinalIgnoreCase);
  37. }
  38. /// <summary>
  39. /// Gets the user data key.
  40. /// </summary>
  41. /// <returns>System.String.</returns>
  42. public override string GetUserDataKey()
  43. {
  44. return this.GetProviderId(MetadataProviders.Tmdb) ?? this.GetProviderId(MetadataProviders.Imdb) ?? base.GetUserDataKey();
  45. }
  46. protected override bool GetBlockUnratedValue(UserConfiguration config)
  47. {
  48. return config.BlockUnratedMusic;
  49. }
  50. }
  51. }