瀏覽代碼

supply user agent when direct recording

Luke Pulverenti 8 年之前
父節點
當前提交
be390433dd
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs

+ 7 - 1
Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs

@@ -34,7 +34,13 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
             var httpRequestOptions = new HttpRequestOptions
             var httpRequestOptions = new HttpRequestOptions
             {
             {
                 Url = mediaSource.Path,
                 Url = mediaSource.Path,
-                BufferContent = false
+                BufferContent = false,
+
+                // Some remote urls will expect a user agent to be supplied
+                UserAgent = "Emby/3.0",
+
+                // Shouldn't matter but may cause issues
+                EnableHttpCompression = false
             };
             };
 
 
             using (var response = await _httpClient.SendAsync(httpRequestOptions, "GET").ConfigureAwait(false))
             using (var response = await _httpClient.SendAsync(httpRequestOptions, "GET").ConfigureAwait(false))