aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-03-14 19:58:43 +0100
committerShadowghost <Ghost_of_Stone@web.de>2026-03-14 19:58:43 +0100
commit98bbc26c5e8260ae7e5f7f8e423c2480d35ca047 (patch)
tree91085ddc757b67a4dff6e8d26ab23ed17d0034bc /Jellyfin.Server.Implementations
parentd65960fe5d3f798ea3ac0527abb96b3327a39ba4 (diff)
Add callback for segment data pruning to IMediaSegmentProvider
Diffstat (limited to 'Jellyfin.Server.Implementations')
-rw-r--r--Jellyfin.Server.Implementations/MediaSegments/MediaSegmentManager.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Jellyfin.Server.Implementations/MediaSegments/MediaSegmentManager.cs b/Jellyfin.Server.Implementations/MediaSegments/MediaSegmentManager.cs
index d00c87463c..bcf1296331 100644
--- a/Jellyfin.Server.Implementations/MediaSegments/MediaSegmentManager.cs
+++ b/Jellyfin.Server.Implementations/MediaSegments/MediaSegmentManager.cs
@@ -187,6 +187,18 @@ public class MediaSegmentManager : IMediaSegmentManager
{
await db.MediaSegments.Where(e => e.ItemId.Equals(itemId)).ExecuteDeleteAsync(cancellationToken).ConfigureAwait(false);
}
+
+ foreach (var provider in _segmentProviders)
+ {
+ try
+ {
+ await provider.CleanupExtractedData(itemId, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "Provider {ProviderName} failed to clean up extracted data for item {ItemId}", provider.Name, itemId);
+ }
+ }
}
/// <inheritdoc />