diff options
Diffstat (limited to 'Jellyfin.Api/Controllers/VideosController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/VideosController.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Jellyfin.Api/Controllers/VideosController.cs b/Jellyfin.Api/Controllers/VideosController.cs index bf08ad376..64d8fb498 100644 --- a/Jellyfin.Api/Controllers/VideosController.cs +++ b/Jellyfin.Api/Controllers/VideosController.cs @@ -149,7 +149,7 @@ namespace Jellyfin.Api.Controllers { var video = (Video)_libraryManager.GetItemById(itemId); - if (video == null) + if (video is null) { return NotFound("The video either does not exist or the id does not belong to a video."); } @@ -199,7 +199,7 @@ namespace Jellyfin.Api.Controllers } var primaryVersion = items.FirstOrDefault(i => i.MediaSourceCount > 1 && string.IsNullOrEmpty(i.PrimaryVersionId)); - if (primaryVersion == null) + if (primaryVersion is null) { primaryVersion = items .OrderBy(i => @@ -439,12 +439,12 @@ namespace Jellyfin.Api.Controllers cancellationTokenSource.Token) .ConfigureAwait(false); - if (@static.HasValue && @static.Value && state.DirectStreamProvider != null) + if (@static.HasValue && @static.Value && state.DirectStreamProvider is not null) { StreamingHelpers.AddDlnaHeaders(state, Response.Headers, true, state.Request.StartTimeTicks, Request, _dlnaManager); var liveStreamInfo = _mediaSourceManager.GetLiveStreamInfo(streamingRequest.LiveStreamId); - if (liveStreamInfo == null) + if (liveStreamInfo is null) { return NotFound(); } @@ -472,7 +472,7 @@ namespace Jellyfin.Api.Controllers var outputPathExists = System.IO.File.Exists(outputPath); var transcodingJob = _transcodingJobHelper.GetTranscodingJob(outputPath, TranscodingJobType.Progressive); - var isTranscodeCached = outputPathExists && transcodingJob != null; + var isTranscodeCached = outputPathExists && transcodingJob is not null; StreamingHelpers.AddDlnaHeaders(state, Response.Headers, (@static.HasValue && @static.Value) || isTranscodeCached, state.Request.StartTimeTicks, Request, _dlnaManager); |
