add fetch timeout

pull/702/head
Luke Pulverenti 9 years ago
parent 19076d0546
commit 9dfb7cc307

@ -105,11 +105,6 @@ namespace MediaBrowser.Server.Implementations.Library
return GetMediaStreamsForItem(list);
}
private int GetMaxAllowedBitrateForExternalSubtitleStream()
{
return 30000000;
}
private IEnumerable<MediaStream> GetMediaStreamsForItem(IEnumerable<MediaStream> streams)
{
var list = streams.ToList();
@ -120,25 +115,9 @@ namespace MediaBrowser.Server.Implementations.Library
if (subtitleStreams.Count > 0)
{
var videoStream = list.FirstOrDefault(i => i.Type == MediaStreamType.Video);
int maxAllowedBitrateForExternalSubtitleStream = GetMaxAllowedBitrateForExternalSubtitleStream();
var videoBitrate = videoStream == null ? maxAllowedBitrateForExternalSubtitleStream : videoStream.BitRate ?? maxAllowedBitrateForExternalSubtitleStream;
foreach (var subStream in subtitleStreams)
{
var supportsExternalStream = StreamSupportsExternalStream(subStream);
if (!subStream.IsExternal)
{
if (supportsExternalStream && videoBitrate >= maxAllowedBitrateForExternalSubtitleStream)
{
supportsExternalStream = false;
}
}
subStream.SupportsExternalStream = supportsExternalStream;
subStream.SupportsExternalStream = StreamSupportsExternalStream(subStream);
}
}

@ -18,6 +18,7 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using CommonIO.Windows;
using ImageMagickSharp;
using MediaBrowser.Server.Implementations.Logging;
namespace MediaBrowser.ServerApplication
@ -47,6 +48,8 @@ namespace MediaBrowser.ServerApplication
var applicationPath = currentProcess.MainModule.FileName;
var architecturePath = Path.Combine(Path.GetDirectoryName(applicationPath), Environment.Is64BitProcess ? "x64" : "x86");
Wand.SetMagickCoderModulePath(architecturePath);
var success = SetDllDirectory(architecturePath);
var appPaths = CreateApplicationPaths(applicationPath, _isRunningAsService);

@ -425,7 +425,11 @@ namespace MediaBrowser.WebDashboard.Api
builder.AppendFormat("window.appMode='{0}';", mode);
}
if (!string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase))
{
builder.AppendFormat("window.dashboardVersion='{0}';", version);
}
builder.Append("</script>");
var versionString = !string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase) ? "?v=" + version : string.Empty;

Loading…
Cancel
Save