AdultVideo.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using MediaBrowser.Controller.Providers;
  2. using System;
  3. using System.Collections.Generic;
  4. namespace MediaBrowser.Controller.Entities
  5. {
  6. [Obsolete]
  7. public class AdultVideo : Video, IHasProductionLocations, IHasPreferredMetadataLanguage, IHasTaglines
  8. {
  9. /// <summary>
  10. /// Gets or sets the preferred metadata language.
  11. /// </summary>
  12. /// <value>The preferred metadata language.</value>
  13. public string PreferredMetadataLanguage { get; set; }
  14. /// <summary>
  15. /// Gets or sets the preferred metadata country code.
  16. /// </summary>
  17. /// <value>The preferred metadata country code.</value>
  18. public string PreferredMetadataCountryCode { get; set; }
  19. public List<string> ProductionLocations { get; set; }
  20. public List<string> Taglines { get; set; }
  21. public AdultVideo()
  22. {
  23. Taglines = new List<string>();
  24. ProductionLocations = new List<string>();
  25. }
  26. public override bool BeforeMetadataRefresh()
  27. {
  28. var hasChanges = base.BeforeMetadataRefresh();
  29. if (!ProductionYear.HasValue)
  30. {
  31. int? yearInName = null;
  32. string name;
  33. NameParser.ParseName(Name, out name, out yearInName);
  34. if (yearInName.HasValue)
  35. {
  36. ProductionYear = yearInName;
  37. hasChanges = true;
  38. }
  39. }
  40. return hasChanges;
  41. }
  42. }
  43. }