mirror of https://github.com/jellyfin/jellyfin.git
lazy load scripts
This commit is contained in:
parent
ae768735aa
commit
c7171177b9
|
@ -625,6 +625,8 @@ namespace MediaBrowser.Api.Images
|
||||||
|
|
||||||
var file = await _imageProcessor.ProcessImage(options).ConfigureAwait(false);
|
var file = await _imageProcessor.ProcessImage(options).ConfigureAwait(false);
|
||||||
|
|
||||||
|
headers["Vary"] = "Accept";
|
||||||
|
|
||||||
return ResultFactory.GetStaticFileResult(Request, new StaticFileResultOptions
|
return ResultFactory.GetStaticFileResult(Request, new StaticFileResultOptions
|
||||||
{
|
{
|
||||||
CacheDuration = cacheDuration,
|
CacheDuration = cacheDuration,
|
||||||
|
|
|
@ -483,6 +483,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||||
FetchStudios(audio, tags, "organization");
|
FetchStudios(audio, tags, "organization");
|
||||||
FetchStudios(audio, tags, "ensemble");
|
FetchStudios(audio, tags, "ensemble");
|
||||||
FetchStudios(audio, tags, "publisher");
|
FetchStudios(audio, tags, "publisher");
|
||||||
|
FetchStudios(audio, tags, "label");
|
||||||
|
|
||||||
// These support mulitple values, but for now we only store the first.
|
// These support mulitple values, but for now we only store the first.
|
||||||
audio.SetProviderId(MetadataProviders.MusicBrainzAlbumArtist, GetMultipleMusicBrainzId(FFProbeHelpers.GetDictionaryValue(tags, "MusicBrainz Album Artist Id")));
|
audio.SetProviderId(MetadataProviders.MusicBrainzAlbumArtist, GetMultipleMusicBrainzId(FFProbeHelpers.GetDictionaryValue(tags, "MusicBrainz Album Artist Id")));
|
||||||
|
|
|
@ -45,19 +45,15 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dto is CompressedResult)
|
var vary = "Accept-Encoding";
|
||||||
{
|
|
||||||
// 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 hasOptions = dto as IHasOptions;
|
var hasOptions = dto as IHasOptions;
|
||||||
|
var sharpResponse = res as WebSocketSharpResponse;
|
||||||
|
|
||||||
if (hasOptions != null)
|
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
|
// Content length has to be explicitly set on on HttpListenerResponse or it won't be happy
|
||||||
string contentLength;
|
string contentLength;
|
||||||
|
|
||||||
|
@ -79,14 +75,29 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var sharpResponse = res as WebSocketSharpResponse;
|
|
||||||
if (sharpResponse != null)
|
if (sharpResponse != null)
|
||||||
{
|
{
|
||||||
sharpResponse.SendChunked = false;
|
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>
|
/// <summary>
|
||||||
|
|
|
@ -590,12 +590,7 @@ namespace MediaBrowser.WebDashboard.Api
|
||||||
"kids.js",
|
"kids.js",
|
||||||
"librarypathmapping.js",
|
"librarypathmapping.js",
|
||||||
"librarysettings.js",
|
"librarysettings.js",
|
||||||
"livetvchannel.js",
|
|
||||||
"livetvguide.js",
|
|
||||||
"livetvnewrecording.js",
|
|
||||||
"livetvprogram.js",
|
|
||||||
"livetvrecording.js",
|
"livetvrecording.js",
|
||||||
"livetvrecordinglist.js",
|
|
||||||
"livetvtimer.js",
|
"livetvtimer.js",
|
||||||
"livetvseriestimer.js",
|
"livetvseriestimer.js",
|
||||||
"livetvsettings.js",
|
"livetvsettings.js",
|
||||||
|
|
|
@ -150,6 +150,9 @@
|
||||||
<Content Include="dashboard-ui\scripts\kids.js">
|
<Content Include="dashboard-ui\scripts\kids.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="dashboard-ui\scripts\livetvcomponents.js">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="dashboard-ui\scripts\livetvitems.js">
|
<Content Include="dashboard-ui\scripts\livetvitems.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
|
Loading…
Reference in New Issue