Selaa lähdekoodia

Attempt to fix Chromecast support

drmrbg 6 vuotta sitten
vanhempi
sitoutus
6ffde49760
1 muutettua tiedostoa jossa 18 lisäystä ja 0 poistoa
  1. 18 0
      MediaBrowser.Api/Playback/BaseStreamingService.cs

+ 18 - 0
MediaBrowser.Api/Playback/BaseStreamingService.cs

@@ -588,6 +588,22 @@ namespace MediaBrowser.Api.Playback
             }
         }
 
+        /// <summary>
+        /// Parses query parameters as StreamOptions
+        /// <summary>
+        /// <param name="request">The stream request.</param>
+        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;
+                }
+            }
+        }
+
         /// <summary>
         /// Parses the dlna headers.
         /// </summary>
@@ -666,6 +682,8 @@ namespace MediaBrowser.Api.Playback
                 ParseParams(request);
             }
 
+            ParseStreamOptions(request);
+
             var url = Request.PathInfo;
 
             if (string.IsNullOrEmpty(request.AudioCodec))