diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-12-06 23:57:04 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-12-06 23:57:04 -0500 |
| commit | 9dfb7cc30761da758bb0411d7b20f022c5f91ed9 (patch) | |
| tree | f5e6a0cfb6628d52751281b0216462b5a3334e27 | |
| parent | 19076d054637074a0ae7a61b994c67577c9b6f4d (diff) | |
add fetch timeout
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/MediaSourceManager.cs | 23 | ||||
| -rw-r--r-- | MediaBrowser.ServerApplication/MainStartup.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.WebDashboard/Api/PackageCreator.cs | 6 |
3 files changed, 9 insertions, 23 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/MediaSourceManager.cs b/MediaBrowser.Server.Implementations/Library/MediaSourceManager.cs index 99096441e..2105f1a47 100644 --- a/MediaBrowser.Server.Implementations/Library/MediaSourceManager.cs +++ b/MediaBrowser.Server.Implementations/Library/MediaSourceManager.cs @@ -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); } } diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs index 3ef171442..3fec815f5 100644 --- a/MediaBrowser.ServerApplication/MainStartup.cs +++ b/MediaBrowser.ServerApplication/MainStartup.cs @@ -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); diff --git a/MediaBrowser.WebDashboard/Api/PackageCreator.cs b/MediaBrowser.WebDashboard/Api/PackageCreator.cs index 20b1a56cf..8b8a00a63 100644 --- a/MediaBrowser.WebDashboard/Api/PackageCreator.cs +++ b/MediaBrowser.WebDashboard/Api/PackageCreator.cs @@ -425,7 +425,11 @@ namespace MediaBrowser.WebDashboard.Api builder.AppendFormat("window.appMode='{0}';", mode); } - builder.AppendFormat("window.dashboardVersion='{0}';", version); + 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; |
