aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/DynamicHlsController.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2021-05-21 13:05:03 +0200
committerGitHub <noreply@github.com>2021-05-21 13:05:03 +0200
commitd61530eb4b07ec19116773cdae1bb0d4cfa5d3d5 (patch)
treef95281f1b7c50e0f69a94a98a52acc682819a511 /Jellyfin.Api/Controllers/DynamicHlsController.cs
parenta937a854f2582a8770d9ada7c24375065a21f7a5 (diff)
parent7e8428e588b3f0a0574da44081098c64fe1a47d7 (diff)
Merge pull request #6083 from Bond-009/nullable4
Enable nullable reference types for Emby.Server.Implementations
Diffstat (limited to 'Jellyfin.Api/Controllers/DynamicHlsController.cs')
-rw-r--r--Jellyfin.Api/Controllers/DynamicHlsController.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Api/Controllers/DynamicHlsController.cs b/Jellyfin.Api/Controllers/DynamicHlsController.cs
index 9f3216de3..555062e55 100644
--- a/Jellyfin.Api/Controllers/DynamicHlsController.cs
+++ b/Jellyfin.Api/Controllers/DynamicHlsController.cs
@@ -1760,9 +1760,9 @@ namespace Jellyfin.Api.Controllers
private static FileSystemMetadata? GetLastTranscodingFile(string playlist, string segmentExtension, IFileSystem fileSystem)
{
- var folder = Path.GetDirectoryName(playlist);
+ var folder = Path.GetDirectoryName(playlist) ?? throw new ArgumentException("Path can't be a root directory.", nameof(playlist));
- var filePrefix = Path.GetFileNameWithoutExtension(playlist) ?? string.Empty;
+ var filePrefix = Path.GetFileNameWithoutExtension(playlist);
try
{