aboutsummaryrefslogtreecommitdiff
path: root/Emby.Dlna/PlayTo/PlayToController.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2022-12-05 15:01:13 +0100
committerBond_009 <bond.009@outlook.com>2022-12-05 15:01:13 +0100
commit52194f56b5f07e3ae01e2fb6d121452e37d1e93f (patch)
treefd638972f72ec49734ad07f831a3aae3b2501a1d /Emby.Dlna/PlayTo/PlayToController.cs
parentc7d50d640e614a3c13699e3041fbfcb258861c5a (diff)
Replace != null with is not null
Diffstat (limited to 'Emby.Dlna/PlayTo/PlayToController.cs')
-rw-r--r--Emby.Dlna/PlayTo/PlayToController.cs24
1 files changed, 12 insertions, 12 deletions
diff --git a/Emby.Dlna/PlayTo/PlayToController.cs b/Emby.Dlna/PlayTo/PlayToController.cs
index fca5fc2a0..d46a501c7 100644
--- a/Emby.Dlna/PlayTo/PlayToController.cs
+++ b/Emby.Dlna/PlayTo/PlayToController.cs
@@ -84,7 +84,7 @@ namespace Emby.Dlna.PlayTo
_mediaEncoder = mediaEncoder;
}
- public bool IsSessionActive => !_disposed && _device != null;
+ public bool IsSessionActive => !_disposed && _device is not null;
public bool SupportsMediaControl => IsSessionActive;
@@ -156,7 +156,7 @@ namespace Emby.Dlna.PlayTo
try
{
var streamInfo = StreamParams.ParseFromUrl(e.OldMediaInfo.Url, _libraryManager, _mediaSourceManager);
- if (streamInfo.Item != null)
+ if (streamInfo.Item is not null)
{
var positionTicks = GetProgressPositionTicks(streamInfo);
@@ -268,7 +268,7 @@ namespace Emby.Dlna.PlayTo
{
var info = StreamParams.ParseFromUrl(e.MediaInfo.Url, _libraryManager, _mediaSourceManager);
- if (info.Item != null)
+ if (info.Item is not null)
{
var progress = GetProgressInfo(info);
@@ -299,7 +299,7 @@ namespace Emby.Dlna.PlayTo
var info = StreamParams.ParseFromUrl(mediaUrl, _libraryManager, _mediaSourceManager);
- if (info.Item != null)
+ if (info.Item is not null)
{
var progress = GetProgressInfo(info);
@@ -441,11 +441,11 @@ namespace Emby.Dlna.PlayTo
{
var media = _device.CurrentMediaInfo;
- if (media != null)
+ if (media is not null)
{
var info = StreamParams.ParseFromUrl(media.Url, _libraryManager, _mediaSourceManager);
- if (info.Item != null && !EnableClientSideSeek(info))
+ if (info.Item is not null && !EnableClientSideSeek(info))
{
var user = _session.UserId.Equals(default)
? null
@@ -760,11 +760,11 @@ namespace Emby.Dlna.PlayTo
{
var media = _device.CurrentMediaInfo;
- if (media != null)
+ if (media is not null)
{
var info = StreamParams.ParseFromUrl(media.Url, _libraryManager, _mediaSourceManager);
- if (info.Item != null)
+ if (info.Item is not null)
{
var newPosition = GetProgressPositionTicks(info) ?? 0;
@@ -791,11 +791,11 @@ namespace Emby.Dlna.PlayTo
{
var media = _device.CurrentMediaInfo;
- if (media != null)
+ if (media is not null)
{
var info = StreamParams.ParseFromUrl(media.Url, _libraryManager, _mediaSourceManager);
- if (info.Item != null)
+ if (info.Item is not null)
{
var newPosition = GetProgressPositionTicks(info) ?? 0;
@@ -916,7 +916,7 @@ namespace Emby.Dlna.PlayTo
public async Task<MediaSourceInfo> GetMediaSource(CancellationToken cancellationToken)
{
- if (_mediaSource != null)
+ if (_mediaSource is not null)
{
return _mediaSource;
}
@@ -926,7 +926,7 @@ namespace Emby.Dlna.PlayTo
return null;
}
- if (_mediaSourceManager != null)
+ if (_mediaSourceManager is not null)
{
_mediaSource = await _mediaSourceManager.GetMediaSource(Item, MediaSourceId, LiveStreamId, false, cancellationToken).ConfigureAwait(false);
}