aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Item/KeyframeRepository.cs
diff options
context:
space:
mode:
authorTim Eisele <Ghost_of_Stone@web.de>2025-05-05 05:21:44 +0200
committerGitHub <noreply@github.com>2025-05-04 21:21:44 -0600
commitd976f13970e034a24c1d0f69384501e31475a127 (patch)
tree8b04bfba52b06c2c8f762beeaa3f7efebc7d6584 /Jellyfin.Server.Implementations/Item/KeyframeRepository.cs
parent0c3ba30de214eddcd6118c3b695b08e5482bf7ed (diff)
Recognize file changes and remove data on change (#13839)
Diffstat (limited to 'Jellyfin.Server.Implementations/Item/KeyframeRepository.cs')
-rw-r--r--Jellyfin.Server.Implementations/Item/KeyframeRepository.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Jellyfin.Server.Implementations/Item/KeyframeRepository.cs b/Jellyfin.Server.Implementations/Item/KeyframeRepository.cs
index a2267700f..93c6f472e 100644
--- a/Jellyfin.Server.Implementations/Item/KeyframeRepository.cs
+++ b/Jellyfin.Server.Implementations/Item/KeyframeRepository.cs
@@ -61,4 +61,12 @@ public class KeyframeRepository : IKeyframeRepository
await context.SaveChangesAsync(cancellationToken).ConfigureAwait(false);
await transaction.CommitAsync(cancellationToken).ConfigureAwait(false);
}
+
+ /// <inheritdoc />
+ public async Task DeleteKeyframeDataAsync(Guid itemId, CancellationToken cancellationToken)
+ {
+ using var context = _dbProvider.CreateDbContext();
+ await context.KeyframeData.Where(e => e.ItemId.Equals(itemId)).ExecuteDeleteAsync(cancellationToken).ConfigureAwait(false);
+ await context.SaveChangesAsync(cancellationToken).ConfigureAwait(false);
+ }
}