mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-10-30 18:22:48 -04:00 
			
		
		
		
	Simplify HLS file deletion
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									9f4f76b0ab
								
							
						
					
					
						commit
						abcf9c4819
					
				| @ -1502,18 +1502,11 @@ namespace Jellyfin.Api.Controllers | |||||||
|                     { |                     { | ||||||
|                         // If the playlist doesn't already exist, startup ffmpeg |                         // If the playlist doesn't already exist, startup ffmpeg | ||||||
|                         try |                         try | ||||||
|                         { |  | ||||||
|                             if (_encodingOptions.EnableThrottling && _encodingOptions.EnableSegmentDeletion) |  | ||||||
|                         { |                         { | ||||||
|                             // Delete old HLS files when segment deletion is active since ffmpeg doesn't clean them up by itself |                             // 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) |                             var deleteFiles = _encodingOptions.EnableThrottling && _encodingOptions.EnableSegmentDeletion; | ||||||
|  |                             await _transcodingJobHelper.KillTranscodingJobs(streamingRequest.DeviceId, streamingRequest.PlaySessionId, _ => deleteFiles) | ||||||
|                                 .ConfigureAwait(false); |                                 .ConfigureAwait(false); | ||||||
|                             } |  | ||||||
|                             else |  | ||||||
|                             { |  | ||||||
|                                 await _transcodingJobHelper.KillTranscodingJobs(streamingRequest.DeviceId, streamingRequest.PlaySessionId, p => false) |  | ||||||
|                                     .ConfigureAwait(false); |  | ||||||
|                             } |  | ||||||
| 
 | 
 | ||||||
|                             if (currentTranscodingIndex.HasValue) |                             if (currentTranscodingIndex.HasValue) | ||||||
|                             { |                             { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user