< Summary - Jellyfin

Information
Class: Emby.Server.Implementations.Library.KeyframeManager
Assembly: Emby.Server.Implementations
File(s): /srv/git/jellyfin/Emby.Server.Implementations/Library/KeyframeManager.cs
Line coverage
66%
Covered lines: 2
Uncovered lines: 1
Coverable lines: 3
Total lines: 44
Line coverage: 66.6%
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%
GetKeyframeData(...)100%210%

File(s)

/srv/git/jellyfin/Emby.Server.Implementations/Library/KeyframeManager.cs

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using System.Threading;
 4using System.Threading.Tasks;
 5using Jellyfin.MediaEncoding.Keyframes;
 6using MediaBrowser.Controller.IO;
 7using MediaBrowser.Controller.Persistence;
 8
 9namespace Emby.Server.Implementations.Library;
 10
 11/// <summary>
 12/// Manager for Keyframe data.
 13/// </summary>
 14public class KeyframeManager : IKeyframeManager
 15{
 16    private readonly IKeyframeRepository _repository;
 17
 18    /// <summary>
 19    /// Initializes a new instance of the <see cref="KeyframeManager"/> class.
 20    /// </summary>
 21    /// <param name="repository">The keyframe repository.</param>
 22    public KeyframeManager(IKeyframeRepository repository)
 23    {
 2124        _repository = repository;
 2125    }
 26
 27    /// <inheritdoc />
 28    public IReadOnlyList<KeyframeData> GetKeyframeData(Guid itemId)
 29    {
 030        return _repository.GetKeyframeData(itemId);
 31    }
 32
 33    /// <inheritdoc />
 34    public async Task SaveKeyframeDataAsync(Guid itemId, KeyframeData data, CancellationToken cancellationToken)
 35    {
 36        await _repository.SaveKeyframeDataAsync(itemId, data, cancellationToken).ConfigureAwait(false);
 37    }
 38
 39    /// <inheritdoc />
 40    public async Task DeleteKeyframeDataAsync(Guid itemId, CancellationToken cancellationToken)
 41    {
 42        await _repository.DeleteKeyframeDataAsync(itemId, cancellationToken).ConfigureAwait(false);
 43    }
 44}