From 535b327e35ac347bd5d05a61c1df76c9ac7ffcd9 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 30 Apr 2016 00:24:45 -0400 Subject: [PATCH] add ffmpeg info --- MediaBrowser.Server.Mac/Native/BaseMonoApp.cs | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/MediaBrowser.Server.Mac/Native/BaseMonoApp.cs b/MediaBrowser.Server.Mac/Native/BaseMonoApp.cs index c8c81e9179..9c2d20d99d 100644 --- a/MediaBrowser.Server.Mac/Native/BaseMonoApp.cs +++ b/MediaBrowser.Server.Mac/Native/BaseMonoApp.cs @@ -111,6 +111,52 @@ namespace MediaBrowser.Server.Mac throw new NotImplementedException(); } + public FFMpegInstallInfo GetFfmpegInstallInfo() + { + return GetInfo(Environment); + } + + public static FFMpegDownloadInfo GetInfo(NativeEnvironment environment) + { + var info = new FFMpegDownloadInfo(); + + info.ArchiveType = "7z"; + + switch (environment.SystemArchitecture) + { + case Architecture.X86_X64: + info.Version = "20160124"; + break; + case Architecture.X86: + info.Version = "20150110"; + break; + } + + info.DownloadUrls = GetDownloadUrls(environment); + + return info; + } + + private static string[] GetDownloadUrls(NativeEnvironment environment) + { + switch (environment.SystemArchitecture) + { + case Architecture.X86_X64: + return new[] + { + "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/osx/ffmpeg-x64-2.8.5.7z" + }; + case Architecture.X86: + return new[] + { + "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/osx/ffmpeg-x86-2.5.3.7z" + }; + } + + // No version available + return new string[] { }; + } + public INetworkManager CreateNetworkManager(ILogger logger) { return new NetworkManager(logger);