aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Startup.Common/FFMpeg
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-11-23 18:10:41 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-11-23 18:10:41 -0500
commit2df4273ee08425858f93cf86092df45a5a6deecc (patch)
treedaa20b4be88311cd070a6293ebc322ee141432e2 /MediaBrowser.Server.Startup.Common/FFMpeg
parent1923de72bf3c502ba9b942ef6caa5f73a33f43d6 (diff)
consolidate os display name
Diffstat (limited to 'MediaBrowser.Server.Startup.Common/FFMpeg')
-rw-r--r--MediaBrowser.Server.Startup.Common/FFMpeg/FFMpegDownloader.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Startup.Common/FFMpeg/FFMpegDownloader.cs b/MediaBrowser.Server.Startup.Common/FFMpeg/FFMpegDownloader.cs
index 2e58e75d87..229fee18d8 100644
--- a/MediaBrowser.Server.Startup.Common/FFMpeg/FFMpegDownloader.cs
+++ b/MediaBrowser.Server.Startup.Common/FFMpeg/FFMpegDownloader.cs
@@ -22,19 +22,21 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
private readonly ILogger _logger;
private readonly IZipClient _zipClient;
private readonly IFileSystem _fileSystem;
+ private readonly NativeEnvironment _environment;
private readonly string[] _fontUrls =
{
"https://github.com/MediaBrowser/MediaBrowser.Resources/raw/master/ffmpeg/ARIALUNI.7z"
};
- public FFMpegDownloader(ILogger logger, IApplicationPaths appPaths, IHttpClient httpClient, IZipClient zipClient, IFileSystem fileSystem)
+ public FFMpegDownloader(ILogger logger, IApplicationPaths appPaths, IHttpClient httpClient, IZipClient zipClient, IFileSystem fileSystem, NativeEnvironment environment)
{
_logger = logger;
_appPaths = appPaths;
_httpClient = httpClient;
_zipClient = zipClient;
_fileSystem = fileSystem;
+ _environment = environment;
}
public async Task<FFMpegInfo> GetFFMpegInfo(NativeEnvironment environment, StartupOptions options, IProgress<double> progress)
@@ -240,7 +242,7 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
private void SetFilePermissions(string targetFolder, string file)
{
// Linux: File permission to 666, and user's execute bit
- if (Environment.OSVersion.Platform == PlatformID.Unix || Environment.OSVersion.Platform == PlatformID.MacOSX)
+ if (_environment.OperatingSystem == OperatingSystem.Bsd || _environment.OperatingSystem == OperatingSystem.Linux || _environment.OperatingSystem == OperatingSystem.Osx)
{
Syscall.chmod(Path.Combine(targetFolder, Path.GetFileName(file)), FilePermissions.DEFFILEMODE | FilePermissions.S_IXUSR);
}