aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Models
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2022-12-07 17:40:24 +0100
committerShadowghost <Ghost_of_Stone@web.de>2022-12-07 17:40:24 +0100
commit2c86bd1875e6e85d5867618e992d850453dae663 (patch)
tree671070fb246fd3821bf6f1e58a01c402a2f969d1 /Jellyfin.Api/Models
parentdd5f90802e71083347b6095eb79a9de0b9d34615 (diff)
parent3cb7fe50127b1a8158186b390836ee25ae5a50fd (diff)
Merge branch 'master' into network-rewrite
Diffstat (limited to 'Jellyfin.Api/Models')
-rw-r--r--Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs6
-rw-r--r--Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs2
-rw-r--r--Jellyfin.Api/Models/StreamingDtos/StreamState.cs2
3 files changed, 5 insertions, 5 deletions
diff --git a/Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs b/Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs
index ab67c8732..9060500c8 100644
--- a/Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs
+++ b/Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs
@@ -189,7 +189,7 @@ namespace Jellyfin.Api.Models.PlaybackDtos
{
lock (_timerLock)
{
- if (KillTimer != null)
+ if (KillTimer is not null)
{
KillTimer.Dispose();
KillTimer = null;
@@ -220,7 +220,7 @@ namespace Jellyfin.Api.Models.PlaybackDtos
lock (_timerLock)
{
- if (KillTimer == null)
+ if (KillTimer is null)
{
Logger.LogDebug("Starting kill timer at {0}ms. JobId {1} PlaySessionId {2}", intervalMs, Id, PlaySessionId);
KillTimer = new Timer(new TimerCallback(callback), this, intervalMs, Timeout.Infinite);
@@ -245,7 +245,7 @@ namespace Jellyfin.Api.Models.PlaybackDtos
lock (_timerLock)
{
- if (KillTimer != null)
+ if (KillTimer is not null)
{
var intervalMs = PingTimeout;
diff --git a/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs b/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs
index 99376873c..9c4e377cd 100644
--- a/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs
+++ b/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs
@@ -210,7 +210,7 @@ namespace Jellyfin.Api.Models.PlaybackDtos
private void DisposeTimer()
{
- if (_timer != null)
+ if (_timer is not null)
{
_timer.Dispose();
_timer = null;
diff --git a/Jellyfin.Api/Models/StreamingDtos/StreamState.cs b/Jellyfin.Api/Models/StreamingDtos/StreamState.cs
index 8182e3c9e..1fce1d20a 100644
--- a/Jellyfin.Api/Models/StreamingDtos/StreamState.cs
+++ b/Jellyfin.Api/Models/StreamingDtos/StreamState.cs
@@ -43,7 +43,7 @@ namespace Jellyfin.Api.Models.StreamingDtos
set
{
BaseRequest = value;
- IsVideoRequest = VideoRequest != null;
+ IsVideoRequest = VideoRequest is not null;
}
}