jellyfin/Emby.Naming/Video/ExtraRule.cs

47 lines
1.5 KiB
C#
Raw Normal View History

2020-01-09 17:26:22 +00:00
using MediaBrowser.Model.Entities;
using MediaType = Emby.Naming.Common.MediaType;
2018-09-12 17:26:21 +00:00
namespace Emby.Naming.Video
{
2020-04-01 16:54:06 +00:00
/// <summary>
/// A rule used to match a file path with an <see cref="MediaBrowser.Model.Entities.ExtraType"/>.
/// </summary>
2018-09-12 17:26:21 +00:00
public class ExtraRule
{
2020-11-10 18:23:10 +00:00
/// <summary>
/// Initializes a new instance of the <see cref="ExtraRule"/> class.
/// </summary>
/// <param name="extraType">Type of extra.</param>
/// <param name="ruleType">Type of rule.</param>
/// <param name="token">Token.</param>
/// <param name="mediaType">Media type.</param>
2020-11-01 09:47:31 +00:00
public ExtraRule(ExtraType extraType, ExtraRuleType ruleType, string token, MediaType mediaType)
{
Token = token;
ExtraType = extraType;
RuleType = ruleType;
MediaType = mediaType;
}
2018-09-12 17:26:21 +00:00
/// <summary>
2020-04-01 16:54:06 +00:00
/// Gets or sets the token to use for matching against the file path.
2018-09-12 17:26:21 +00:00
/// </summary>
public string Token { get; set; }
2019-12-06 19:40:06 +00:00
2018-09-12 17:26:21 +00:00
/// <summary>
2020-04-01 16:54:06 +00:00
/// Gets or sets the type of the extra to return when matched.
2018-09-12 17:26:21 +00:00
/// </summary>
2020-01-09 17:26:22 +00:00
public ExtraType ExtraType { get; set; }
2019-12-06 19:40:06 +00:00
2018-09-12 17:26:21 +00:00
/// <summary>
/// Gets or sets the type of the rule.
/// </summary>
public ExtraRuleType RuleType { get; set; }
2019-12-06 19:40:06 +00:00
2018-09-12 17:26:21 +00:00
/// <summary>
2020-04-01 16:54:06 +00:00
/// Gets or sets the type of the media to return when matched.
2018-09-12 17:26:21 +00:00
/// </summary>
public MediaType MediaType { get; set; }
}
}