From 6ffde49760e30c4f0c06d3973442d2977fb276f1 Mon Sep 17 00:00:00 2001 From: drmrbg Date: Fri, 28 Dec 2018 23:18:06 -0800 Subject: [PATCH] Attempt to fix Chromecast support --- .../Playback/BaseStreamingService.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 9c2e0e9d8f..f563fadb29 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -588,6 +588,22 @@ namespace MediaBrowser.Api.Playback } } + /// + /// Parses query parameters as StreamOptions + /// + /// The stream request. + private void ParseStreamOptions(StreamRequest request) + { + foreach (var param in Request.QueryString) { + if (Char.IsLower(param.Name[0])) { + // This was probably not parsed initially and should be a StreamOptions + // TODO: This should be incorporated either in the lower framework for parsing requests + // or the generated URL should correctly serialize it + request.StreamOptions[param.Name] = param.Value; + } + } + } + /// /// Parses the dlna headers. /// @@ -666,6 +682,8 @@ namespace MediaBrowser.Api.Playback ParseParams(request); } + ParseStreamOptions(request); + var url = Request.PathInfo; if (string.IsNullOrEmpty(request.AudioCodec))