aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/MediaInfoController.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/Controllers/MediaInfoController.cs
parent681be595cea8254cbac5bbb3bdc9083c4780db21 (diff)
parent52194f56b5f07e3ae01e2fb6d121452e37d1e93f (diff)
Merge pull request #8511 from Bond-009/isnull
Diffstat (limited to 'Jellyfin.Api/Controllers/MediaInfoController.cs')
-rw-r--r--Jellyfin.Api/Controllers/MediaInfoController.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Jellyfin.Api/Controllers/MediaInfoController.cs b/Jellyfin.Api/Controllers/MediaInfoController.cs
index c111e9218..8115c3585 100644
--- a/Jellyfin.Api/Controllers/MediaInfoController.cs
+++ b/Jellyfin.Api/Controllers/MediaInfoController.cs
@@ -121,10 +121,10 @@ namespace Jellyfin.Api.Controllers
var profile = playbackInfoDto?.DeviceProfile;
_logger.LogDebug("GetPostedPlaybackInfo profile: {@Profile}", profile);
- if (profile == null)
+ if (profile is null)
{
var caps = _deviceManager.GetCapabilities(User.GetDeviceId());
- if (caps != null)
+ if (caps is not null)
{
profile = caps.DeviceProfile;
}
@@ -154,12 +154,12 @@ namespace Jellyfin.Api.Controllers
liveStreamId)
.ConfigureAwait(false);
- if (info.ErrorCode != null)
+ if (info.ErrorCode is not null)
{
return info;
}
- if (profile != null)
+ if (profile is not null)
{
// set device specific data
var item = _libraryManager.GetItemById(itemId);
@@ -194,7 +194,7 @@ namespace Jellyfin.Api.Controllers
{
var mediaSource = string.IsNullOrWhiteSpace(mediaSourceId) ? info.MediaSources[0] : info.MediaSources.FirstOrDefault(i => string.Equals(i.Id, mediaSourceId, StringComparison.Ordinal));
- if (mediaSource != null && mediaSource.RequiresOpening && string.IsNullOrWhiteSpace(mediaSource.LiveStreamId))
+ if (mediaSource is not null && mediaSource.RequiresOpening && string.IsNullOrWhiteSpace(mediaSource.LiveStreamId))
{
var openStreamResult = await _mediaInfoHelper.OpenMediaSource(
HttpContext,