< Summary - Jellyfin

Information
Class: Emby.Naming.Video.ExtraRule
Assembly: Emby.Naming
File(s): /srv/git/jellyfin/Emby.Naming/Video/ExtraRule.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 46
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%

File(s)

/srv/git/jellyfin/Emby.Naming/Video/ExtraRule.cs

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