aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2021-05-20 21:28:18 +0200
committerBond_009 <bond.009@outlook.com>2021-05-20 22:48:53 +0200
commit7e8428e588b3f0a0574da44081098c64fe1a47d7 (patch)
tree4dd11afc9e5b38d46366a9fea207e1dbb82a3e56 /Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs
parente8790bfa963284863dc1126a83df72309ec30561 (diff)
Enable nullable reference types for Emby.Server.Implementations
Diffstat (limited to 'Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs')
-rw-r--r--Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs b/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs
index e33e552ed..7b32d76ba 100644
--- a/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs
+++ b/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs
@@ -145,7 +145,8 @@ namespace Jellyfin.Api.Models.PlaybackDtos
var transcodingPositionTicks = job.TranscodingPositionTicks ?? 0;
var downloadPositionTicks = job.DownloadPositionTicks ?? 0;
- var path = job.Path;
+ var path = job.Path ?? throw new ArgumentException("Path can't be null.");
+
var gapLengthInTicks = TimeSpan.FromSeconds(thresholdSeconds).Ticks;
if (downloadPositionTicks > 0 && transcodingPositionTicks > 0)