aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Helpers/AudioHelper.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2022-12-07 16:39:40 +0100
committerGitHub <noreply@github.com>2022-12-07 16:39:40 +0100
commitf3c57e6a0ae015dc51cf548a0380d1bed33959c2 (patch)
tree1052ce5b7646e4fea7b20768213e89c0e38126ec /Jellyfin.Api/Helpers/AudioHelper.cs
parent681be595cea8254cbac5bbb3bdc9083c4780db21 (diff)
parent52194f56b5f07e3ae01e2fb6d121452e37d1e93f (diff)
Merge pull request #8511 from Bond-009/isnull
Diffstat (limited to 'Jellyfin.Api/Helpers/AudioHelper.cs')
-rw-r--r--Jellyfin.Api/Helpers/AudioHelper.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Jellyfin.Api/Helpers/AudioHelper.cs b/Jellyfin.Api/Helpers/AudioHelper.cs
index bc83ff48a..be410ebcd 100644
--- a/Jellyfin.Api/Helpers/AudioHelper.cs
+++ b/Jellyfin.Api/Helpers/AudioHelper.cs
@@ -85,7 +85,7 @@ namespace Jellyfin.Api.Helpers
TranscodingJobType transcodingJobType,
StreamingRequestDto streamingRequest)
{
- if (_httpContextAccessor.HttpContext == null)
+ if (_httpContextAccessor.HttpContext is null)
{
throw new ResourceNotFoundException(nameof(_httpContextAccessor.HttpContext));
}
@@ -111,12 +111,12 @@ namespace Jellyfin.Api.Helpers
cancellationTokenSource.Token)
.ConfigureAwait(false);
- if (streamingRequest.Static && state.DirectStreamProvider != null)
+ if (streamingRequest.Static && state.DirectStreamProvider is not null)
{
StreamingHelpers.AddDlnaHeaders(state, _httpContextAccessor.HttpContext.Response.Headers, true, streamingRequest.StartTimeTicks, _httpContextAccessor.HttpContext.Request, _dlnaManager);
var liveStreamInfo = _mediaSourceManager.GetLiveStreamInfo(streamingRequest.LiveStreamId);
- if (liveStreamInfo == null)
+ if (liveStreamInfo is null)
{
throw new FileNotFoundException();
}
@@ -144,7 +144,7 @@ namespace Jellyfin.Api.Helpers
var outputPathExists = 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, _httpContextAccessor.HttpContext.Response.Headers, streamingRequest.Static || isTranscodeCached, streamingRequest.StartTimeTicks, _httpContextAccessor.HttpContext.Request, _dlnaManager);