diff options
| author | Dominik <git@secnd.me> | 2022-11-14 14:45:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-14 14:45:42 +0100 |
| commit | abcf9c4819f241be7c80102d7cc80f3b3b27eae2 (patch) | |
| tree | 565099a2533486a8c137bea039dd23fa758b6eb1 /Jellyfin.Api/Controllers/DynamicHlsController.cs | |
| parent | 9f4f76b0ab0f3c3e0d7833d37b28f9915cff0549 (diff) | |
Simplify HLS file deletion
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
Diffstat (limited to 'Jellyfin.Api/Controllers/DynamicHlsController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/DynamicHlsController.cs | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/Jellyfin.Api/Controllers/DynamicHlsController.cs b/Jellyfin.Api/Controllers/DynamicHlsController.cs index 556057a0f..8c385761b 100644 --- a/Jellyfin.Api/Controllers/DynamicHlsController.cs +++ b/Jellyfin.Api/Controllers/DynamicHlsController.cs @@ -1503,17 +1503,10 @@ namespace Jellyfin.Api.Controllers // If the playlist doesn't already exist, startup ffmpeg try { - if (_encodingOptions.EnableThrottling && _encodingOptions.EnableSegmentDeletion) - { - // Delete old HLS files when segment deletion is active since ffmpeg doesn't clean them up by itself - await _transcodingJobHelper.KillTranscodingJobs(streamingRequest.DeviceId, streamingRequest.PlaySessionId, p => true) + // Delete old HLS files when segment deletion is active since ffmpeg doesn't clean them up by itself + var deleteFiles = _encodingOptions.EnableThrottling && _encodingOptions.EnableSegmentDeletion; + await _transcodingJobHelper.KillTranscodingJobs(streamingRequest.DeviceId, streamingRequest.PlaySessionId, _ => deleteFiles) .ConfigureAwait(false); - } - else - { - await _transcodingJobHelper.KillTranscodingJobs(streamingRequest.DeviceId, streamingRequest.PlaySessionId, p => false) - .ConfigureAwait(false); - } if (currentTranscodingIndex.HasValue) { |
