diff options
Diffstat (limited to 'Jellyfin.Api/Helpers/TranscodingJobHelper.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/TranscodingJobHelper.cs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs index 592f22d8d..cb3442ccb 100644 --- a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs +++ b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs @@ -416,7 +416,7 @@ namespace Jellyfin.Api.Helpers } } - if (exs != null) + if (exs is not null) { throw new AggregateException("Error deleting HLS files", exs); } @@ -443,7 +443,7 @@ namespace Jellyfin.Api.Helpers { var ticks = transcodingPosition?.Ticks; - if (job != null) + if (job is not null) { job.Framerate = framerate; job.CompletionPercentage = percentComplete; @@ -510,11 +510,11 @@ namespace Jellyfin.Api.Helpers await AcquireResources(state, cancellationTokenSource).ConfigureAwait(false); - if (state.VideoRequest != null && !EncodingHelper.IsCopyCodec(state.OutputVideoCodec)) + if (state.VideoRequest is not null && !EncodingHelper.IsCopyCodec(state.OutputVideoCodec)) { var userId = request.HttpContext.User.GetUserId(); var user = userId.Equals(default) ? null : _userManager.GetUserById(userId); - if (user != null && !user.HasPermission(PermissionKind.EnableVideoPlaybackTranscoding)) + if (user is not null && !user.HasPermission(PermissionKind.EnableVideoPlaybackTranscoding)) { this.OnTranscodeFailedToStart(outputPath, transcodingJobType, state); @@ -528,7 +528,7 @@ namespace Jellyfin.Api.Helpers } // If subtitles get burned in fonts may need to be extracted from the media file - if (state.SubtitleStream != null && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode) + if (state.SubtitleStream is not null && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode) { var attachmentPath = Path.Combine(_appPaths.CachePath, "attachments", state.MediaSource.Id); await _attachmentExtractor.ExtractAllAttachments(state.MediaPath, state.MediaSource, attachmentPath, cancellationTokenSource.Token).ConfigureAwait(false); @@ -577,7 +577,7 @@ namespace Jellyfin.Api.Helpers _logger.LogInformation("{Filename} {Arguments}", process.StartInfo.FileName, process.StartInfo.Arguments); var logFilePrefix = "FFmpeg.Transcode-"; - if (state.VideoRequest != null + if (state.VideoRequest is not null && EncodingHelper.IsCopyCodec(state.OutputVideoCodec)) { logFilePrefix = EncodingHelper.IsCopyCodec(state.OutputAudioCodec) @@ -748,7 +748,7 @@ namespace Jellyfin.Api.Helpers { var job = _activeTranscodingJobs.FirstOrDefault(j => j.Type == type && string.Equals(j.Path, path, StringComparison.OrdinalIgnoreCase)); - if (job != null) + if (job is not null) { _activeTranscodingJobs.Remove(job); } @@ -805,7 +805,7 @@ namespace Jellyfin.Api.Helpers _encodingHelper.AttachMediaSourceInfo(state, encodingOptions, liveStreamResponse.MediaSource, state.RequestedUrl); - if (state.VideoRequest != null) + if (state.VideoRequest is not null) { _encodingHelper.TryStreamCopy(state); } |
