diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2022-12-07 17:40:24 +0100 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2022-12-07 17:40:24 +0100 |
| commit | 2c86bd1875e6e85d5867618e992d850453dae663 (patch) | |
| tree | 671070fb246fd3821bf6f1e58a01c402a2f969d1 /Jellyfin.Api/Controllers/MediaInfoController.cs | |
| parent | dd5f90802e71083347b6095eb79a9de0b9d34615 (diff) | |
| parent | 3cb7fe50127b1a8158186b390836ee25ae5a50fd (diff) | |
Merge branch 'master' into network-rewrite
Diffstat (limited to 'Jellyfin.Api/Controllers/MediaInfoController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/MediaInfoController.cs | 10 |
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, |
