diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-11-16 16:27:37 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-16 16:27:37 +0000 |
| commit | d66f88672cdc21376b5ff5105e7d18b25d549879 (patch) | |
| tree | 1d6459225931fa03b9e299eb46fe765ffacf7839 /Jellyfin.Api/Helpers/StreamingHelpers.cs | |
| parent | e2769671a79dfd73ec2796bcc0cbe97584ee4023 (diff) | |
| parent | dc0e353b968e80b9532638f5a752f89572566d82 (diff) | |
Merge branch 'master' into NetworkPR2
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)) { |
