< Summary - Jellyfin

Information
Class: Emby.Server.Implementations.Library.Resolvers.GenericVideoResolver<T>
Assembly: Emby.Server.Implementations
File(s): /srv/git/jellyfin/Emby.Server.Implementations/Library/Resolvers/GenericVideoResolver.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 39
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 5/2/2026 - 12:12:50 AM Line coverage: 100% (2/2) Total lines: 287/26/2026 - 12:17:51 AM Line coverage: 100% (4/4) Total lines: 39

Coverage delta

Coverage delta 1 -1

Metrics

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

File(s)

/srv/git/jellyfin/Emby.Server.Implementations/Library/Resolvers/GenericVideoResolver.cs

#LineLine coverage
 1#nullable disable
 2
 3using Emby.Naming.Common;
 4using MediaBrowser.Controller.Entities;
 5using MediaBrowser.Controller.Library;
 6using MediaBrowser.Controller.Providers;
 7using Microsoft.Extensions.Logging;
 8
 9namespace Emby.Server.Implementations.Library.Resolvers
 10{
 11    /// <summary>
 12    /// Resolves a Path into an instance of the <see cref="Video"/> class.
 13    /// </summary>
 14    /// <typeparam name="T">The type of item to resolve.</typeparam>
 15    public class GenericVideoResolver<T> : BaseVideoResolver<T>
 16        where T : Video, new()
 17    {
 18        private readonly bool _parseName;
 19
 20        /// <summary>
 21        /// Initializes a new instance of the <see cref="GenericVideoResolver{T}"/> class.
 22        /// </summary>
 23        /// <param name="logger">The logger.</param>
 24        /// <param name="namingOptions">The naming options.</param>
 25        /// <param name="directoryService">The directory service.</param>
 26        /// <param name="parseName">Whether to parse the file name for metadata such as the year.</param>
 27        public GenericVideoResolver(ILogger logger, NamingOptions namingOptions, IDirectoryService directoryService, boo
 3828            : base(logger, namingOptions, directoryService)
 29        {
 3830            _parseName = parseName;
 3831        }
 32
 33        /// <inheritdoc />
 34        protected override T Resolve(ItemResolveArgs args)
 35        {
 2236            return ResolveVideo<T>(args, _parseName);
 37        }
 38    }
 39}