AdultVideo.cs 1.5 KB

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