ExtraRule.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using MediaBrowser.Model.Entities;
  2. using MediaType = Emby.Naming.Common.MediaType;
  3. namespace Emby.Naming.Video
  4. {
  5. /// <summary>
  6. /// A rule used to match a file path with an <see cref="MediaBrowser.Model.Entities.ExtraType"/>.
  7. /// </summary>
  8. public class ExtraRule
  9. {
  10. /// <summary>
  11. /// Initializes a new instance of the <see cref="ExtraRule"/> class.
  12. /// </summary>
  13. /// <param name="extraType">Type of extra.</param>
  14. /// <param name="ruleType">Type of rule.</param>
  15. /// <param name="token">Token.</param>
  16. /// <param name="mediaType">Media type.</param>
  17. public ExtraRule(ExtraType extraType, ExtraRuleType ruleType, string token, MediaType mediaType)
  18. {
  19. Token = token;
  20. ExtraType = extraType;
  21. RuleType = ruleType;
  22. MediaType = mediaType;
  23. }
  24. /// <summary>
  25. /// Gets or sets the token to use for matching against the file path.
  26. /// </summary>
  27. public string Token { get; set; }
  28. /// <summary>
  29. /// Gets or sets the type of the extra to return when matched.
  30. /// </summary>
  31. public ExtraType ExtraType { get; set; }
  32. /// <summary>
  33. /// Gets or sets the type of the rule.
  34. /// </summary>
  35. public ExtraRuleType RuleType { get; set; }
  36. /// <summary>
  37. /// Gets or sets the type of the media to return when matched.
  38. /// </summary>
  39. public MediaType MediaType { get; set; }
  40. }
  41. }