aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-09-23 14:14:07 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-09-23 14:14:07 -0400
commit4d3bef9f4f04fc8e05e0c0e8160954faa714a43f (patch)
tree2c2510b1757d48430917aed90224e035d0edaf8a
parent0fd0c9bd4e9cbb1c7501b851e1765f546fb8cb0e (diff)
use github raw hosting
-rw-r--r--MediaBrowser.ServerApplication/Implementations/FFMpegDownloader.cs36
1 files changed, 31 insertions, 5 deletions
diff --git a/MediaBrowser.ServerApplication/Implementations/FFMpegDownloader.cs b/MediaBrowser.ServerApplication/Implementations/FFMpegDownloader.cs
index 75c47c10d..1bc0b90f0 100644
--- a/MediaBrowser.ServerApplication/Implementations/FFMpegDownloader.cs
+++ b/MediaBrowser.ServerApplication/Implementations/FFMpegDownloader.cs
@@ -24,10 +24,15 @@ namespace MediaBrowser.ServerApplication.Implementations
private const string Version = "ffmpeg20130904";
- private const string FontUrl = "https://www.dropbox.com/s/pj847twf7riq0j7/ARIALUNI.7z?dl=1";
+ private readonly string[] _fontUrls = new[]
+ {
+ "https://www.dropbox.com/s/pj847twf7riq0j7/ARIALUNI.7z?dl=1"
+ };
private readonly string[] _ffMpegUrls = new[]
{
+ "https://raw.github.com/MediaBrowser/MediaBrowser/master/MediaBrowser.ServerApplication/Implementations/ffmpeg-20130904-git-f974289-win32-static.7z",
+
"http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20130904-git-f974289-win32-static.7z",
"https://www.dropbox.com/s/a81cb2ob23fwcfs/ffmpeg-20130904-git-f974289-win32-static.7z?dl=1"
};
@@ -218,11 +223,32 @@ namespace MediaBrowser.ServerApplication.Implementations
}
}
- var tempFile = await _httpClient.GetTempFile(new HttpRequestOptions
+ string tempFile = null;
+
+ foreach (var url in _fontUrls)
{
- Url = FontUrl,
- Progress = new Progress<double>()
- });
+ try
+ {
+ tempFile = await _httpClient.GetTempFile(new HttpRequestOptions
+ {
+ Url = url,
+ Progress = new Progress<double>()
+
+ }).ConfigureAwait(false);
+
+ break;
+ }
+ catch (Exception ex)
+ {
+ // The core can function without the font file, so handle this
+ _logger.ErrorException("Failed to download ffmpeg font file from {0}", ex, url);
+ }
+ }
+
+ if (string.IsNullOrEmpty(tempFile))
+ {
+ return;
+ }
Extract7zArchive(tempFile, fontsDirectory);