Luke Pulverenti 10 лет назад
Родитель
Сommit
c7171177b9

+ 2 - 0
MediaBrowser.Api/Images/ImageService.cs

@@ -625,6 +625,8 @@ namespace MediaBrowser.Api.Images
 
             var file = await _imageProcessor.ProcessImage(options).ConfigureAwait(false);
 
+            headers["Vary"] = "Accept";
+
             return ResultFactory.GetStaticFileResult(Request, new StaticFileResultOptions
             {
                 CacheDuration = cacheDuration,

+ 1 - 0
MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs

@@ -483,6 +483,7 @@ namespace MediaBrowser.MediaEncoding.Probing
             FetchStudios(audio, tags, "organization");
             FetchStudios(audio, tags, "ensemble");
             FetchStudios(audio, tags, "publisher");
+            FetchStudios(audio, tags, "label");
 
             // These support mulitple values, but for now we only store the first.
             audio.SetProviderId(MetadataProviders.MusicBrainzAlbumArtist, GetMultipleMusicBrainzId(FFProbeHelpers.GetDictionaryValue(tags, "MusicBrainz Album Artist Id")));

+ 20 - 9
MediaBrowser.Server.Implementations/HttpServer/ResponseFilter.cs

@@ -45,19 +45,15 @@ namespace MediaBrowser.Server.Implementations.HttpServer
                 }
             }
 
-            if (dto is CompressedResult)
-            {
-                // Per Google PageSpeed
-                // This instructs the proxies to cache two versions of the resource: one compressed, and one uncompressed. 
-                // The correct version of the resource is delivered based on the client request header. 
-                // This is a good choice for applications that are singly homed and depend on public proxies for user locality.                        
-                res.AddHeader("Vary", "Accept-Encoding");
-            }
+            var vary = "Accept-Encoding";
 
             var hasOptions = dto as IHasOptions;
+            var sharpResponse = res as WebSocketSharpResponse;
 
             if (hasOptions != null)
             {
+                //hasOptions.Options["Server"] = "Mono-HTTPAPI/1.1";
+
                 // Content length has to be explicitly set on on HttpListenerResponse or it won't be happy
                 string contentLength;
 
@@ -79,14 +75,29 @@ namespace MediaBrowser.Server.Implementations.HttpServer
                             return;
                         }
 
-                        var sharpResponse = res as WebSocketSharpResponse;
                         if (sharpResponse != null)
                         {
                             sharpResponse.SendChunked = false;
                         }
                     }
                 }
+
+                string hasOptionsVary;
+                if (hasOptions.Options.TryGetValue("Vary", out hasOptionsVary))
+                {
+                    vary = hasOptionsVary;
+                }
+
+                hasOptions.Options["Vary"] = vary;
             }
+
+            //res.KeepAlive = false;
+
+            // Per Google PageSpeed
+            // This instructs the proxies to cache two versions of the resource: one compressed, and one uncompressed. 
+            // The correct version of the resource is delivered based on the client request header. 
+            // This is a good choice for applications that are singly homed and depend on public proxies for user locality.                        
+            res.AddHeader("Vary", vary);
         }
 
         /// <summary>

+ 0 - 5
MediaBrowser.WebDashboard/Api/PackageCreator.cs

@@ -590,12 +590,7 @@ namespace MediaBrowser.WebDashboard.Api
                                 "kids.js",
                                 "librarypathmapping.js",
                                 "librarysettings.js",
-                                "livetvchannel.js",
-                                "livetvguide.js",
-                                "livetvnewrecording.js",
-                                "livetvprogram.js",
                                 "livetvrecording.js",
-                                "livetvrecordinglist.js",
                                 "livetvtimer.js",
                                 "livetvseriestimer.js",
                                 "livetvsettings.js",

+ 3 - 0
MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj

@@ -150,6 +150,9 @@
     <Content Include="dashboard-ui\scripts\kids.js">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
+    <Content Include="dashboard-ui\scripts\livetvcomponents.js">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
     <Content Include="dashboard-ui\scripts\livetvitems.js">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>