diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-11-16 19:47:36 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-16 19:47:36 +0000 |
| commit | 2bbfcc264d5b8469f491f7dc2e54d852c1c1111e (patch) | |
| tree | 00f15d3e4543a531bb5e6e0535fd43e683d1d6fd /Jellyfin.Api/Helpers/StreamingHelpers.cs | |
| parent | 4bfcc8b0d15a76d9d33e038cc4e5590fc1016750 (diff) | |
| parent | dc0e353b968e80b9532638f5a752f89572566d82 (diff) | |
Merge branch 'master' into emby-namig-nullable
Diffstat (limited to 'Jellyfin.Api/Helpers/StreamingHelpers.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/StreamingHelpers.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Jellyfin.Api/Helpers/StreamingHelpers.cs b/Jellyfin.Api/Helpers/StreamingHelpers.cs index f4ec29bde..0566f4c4d 100644 --- a/Jellyfin.Api/Helpers/StreamingHelpers.cs +++ b/Jellyfin.Api/Helpers/StreamingHelpers.cs @@ -83,8 +83,12 @@ namespace Jellyfin.Api.Helpers } streamingRequest.StreamOptions = ParseStreamOptions(httpRequest.Query); + if (httpRequest.Path.Value == null) + { + throw new ResourceNotFoundException(nameof(httpRequest.Path)); + } - var url = httpRequest.Path.Value.Split('.').Last(); + var url = httpRequest.Path.Value.Split('.')[^1]; if (string.IsNullOrEmpty(streamingRequest.AudioCodec)) { |
