diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-11-19 09:04:49 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-19 09:04:49 +0000 |
| commit | ef05485243b1d0043b442a4f5ab4cc9be99f16bb (patch) | |
| tree | 39fbf843ae9ebb0c15902d18c3617aece339df50 /Jellyfin.Api/Controllers/HlsSegmentController.cs | |
| parent | 3ffdcfdb802079ee9ad3e76527b4519f3fe4458a (diff) | |
| parent | 49ebbcf87edb805862c032e48796d2b8020e5aa7 (diff) | |
Merge branch 'master' into PluginConfigSave
Diffstat (limited to 'Jellyfin.Api/Controllers/HlsSegmentController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/HlsSegmentController.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/HlsSegmentController.cs b/Jellyfin.Api/Controllers/HlsSegmentController.cs index 054e586ce..3b75e8d43 100644 --- a/Jellyfin.Api/Controllers/HlsSegmentController.cs +++ b/Jellyfin.Api/Controllers/HlsSegmentController.cs @@ -8,6 +8,7 @@ using Jellyfin.Api.Attributes; using Jellyfin.Api.Constants; using Jellyfin.Api.Helpers; using MediaBrowser.Common.Configuration; +using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.MediaEncoding; using MediaBrowser.Model.IO; @@ -134,7 +135,8 @@ namespace Jellyfin.Api.Controllers var playlistPath = _fileSystem.GetFilePaths(transcodeFolderPath) .FirstOrDefault(i => string.Equals(Path.GetExtension(i), ".m3u8", StringComparison.OrdinalIgnoreCase) - && i.IndexOf(normalizedPlaylistId, StringComparison.OrdinalIgnoreCase) != -1); + && i.IndexOf(normalizedPlaylistId, StringComparison.OrdinalIgnoreCase) != -1) + ?? throw new ResourceNotFoundException($"Provided path ({transcodeFolderPath}) is not valid."); return GetFileResult(file, playlistPath); } |
