diff options
| author | Bond-009 <bond.009@outlook.com> | 2022-12-07 17:17:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-07 17:17:37 +0100 |
| commit | 584c80e323ac2a1386d86ff9f59e50daf174418e (patch) | |
| tree | 4dbb2861cb79cf418a76a4b8f364fdc5c62b56f7 /Jellyfin.Api/Helpers/TranscodingJobHelper.cs | |
| parent | f3c57e6a0ae015dc51cf548a0380d1bed33959c2 (diff) | |
| parent | 227aa0540bf0d6c00848b0efb8a5e0ece86c7412 (diff) | |
Merge pull request #8547 from Bond-009/net7
Diffstat (limited to 'Jellyfin.Api/Helpers/TranscodingJobHelper.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/TranscodingJobHelper.cs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs index cb3442ccb..77dd51860 100644 --- a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs +++ b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs @@ -136,10 +136,7 @@ namespace Jellyfin.Api.Helpers /// <exception cref="ArgumentNullException">Play session id is null.</exception> public void PingTranscodingJob(string playSessionId, bool? isUserPaused) { - if (string.IsNullOrEmpty(playSessionId)) - { - throw new ArgumentNullException(nameof(playSessionId)); - } + ArgumentException.ThrowIfNullOrEmpty(playSessionId); _logger.LogDebug("PingTranscodingJob PlaySessionId={0} isUsedPaused: {1}", playSessionId, isUserPaused); @@ -522,10 +519,7 @@ namespace Jellyfin.Api.Helpers } } - if (string.IsNullOrEmpty(_mediaEncoder.EncoderPath)) - { - throw new ArgumentException("FFmpeg path not set."); - } + ArgumentException.ThrowIfNullOrEmpty(_mediaEncoder.EncoderPath); // If subtitles get burned in fonts may need to be extracted from the media file if (state.SubtitleStream is not null && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode) |
