aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Helpers/StreamingHelpers.cs
diff options
context:
space:
mode:
authornyanmisaka <nst799610810@gmail.com>2020-11-16 12:36:55 +0800
committernyanmisaka <nst799610810@gmail.com>2020-11-16 12:36:55 +0800
commit488dbdb31d904ae9eb9b016f0edbb66e734b65f1 (patch)
tree310c3f8e90e3fa5001c91999298478ff40e4bd93 /Jellyfin.Api/Helpers/StreamingHelpers.cs
parentf953dd42be87b5188d476f8c8c8c7d39cd395c73 (diff)
parent8d1d77db94a4fcfc6d8a37b38100ce0b7267690b (diff)
Merge remote-tracking branch 'upstream/master' into fmp4-hls
Diffstat (limited to 'Jellyfin.Api/Helpers/StreamingHelpers.cs')
-rw-r--r--Jellyfin.Api/Helpers/StreamingHelpers.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Jellyfin.Api/Helpers/StreamingHelpers.cs b/Jellyfin.Api/Helpers/StreamingHelpers.cs
index be85d5eb8..c6d844c4f 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))
{