diff options
| author | Tim Eisele <Ghost_of_Stone@web.de> | 2025-05-05 05:21:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-04 21:21:44 -0600 |
| commit | d976f13970e034a24c1d0f69384501e31475a127 (patch) | |
| tree | 8b04bfba52b06c2c8f762beeaa3f7efebc7d6584 /Emby.Server.Implementations/Library/KeyframeManager.cs | |
| parent | 0c3ba30de214eddcd6118c3b695b08e5482bf7ed (diff) | |
Recognize file changes and remove data on change (#13839)
Diffstat (limited to 'Emby.Server.Implementations/Library/KeyframeManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/KeyframeManager.cs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Library/KeyframeManager.cs b/Emby.Server.Implementations/Library/KeyframeManager.cs new file mode 100644 index 000000000..18f4ce047 --- /dev/null +++ b/Emby.Server.Implementations/Library/KeyframeManager.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Jellyfin.MediaEncoding.Keyframes; +using MediaBrowser.Controller.IO; +using MediaBrowser.Controller.Persistence; + +namespace Emby.Server.Implementations.Library; + +/// <summary> +/// Manager for Keyframe data. +/// </summary> +public class KeyframeManager : IKeyframeManager +{ + private readonly IKeyframeRepository _repository; + + /// <summary> + /// Initializes a new instance of the <see cref="KeyframeManager"/> class. + /// </summary> + /// <param name="repository">The keyframe repository.</param> + public KeyframeManager(IKeyframeRepository repository) + { + _repository = repository; + } + + /// <inheritdoc /> + public IReadOnlyList<KeyframeData> GetKeyframeData(Guid itemId) + { + return _repository.GetKeyframeData(itemId); + } + + /// <inheritdoc /> + public async Task SaveKeyframeDataAsync(Guid itemId, KeyframeData data, CancellationToken cancellationToken) + { + await _repository.SaveKeyframeDataAsync(itemId, data, cancellationToken).ConfigureAwait(false); + } + + /// <inheritdoc /> + public async Task DeleteKeyframeDataAsync(Guid itemId, CancellationToken cancellationToken) + { + await _repository.DeleteKeyframeDataAsync(itemId, cancellationToken).ConfigureAwait(false); + } +} |
