diff options
| author | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-08-20 09:36:18 -0400 |
|---|---|---|
| committer | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-08-20 09:36:18 -0400 |
| commit | 19a4dd83c21db931edf14a0ef547219ef93cdc84 (patch) | |
| tree | 1b968aa7478d1cb13292b222aabe988121a9ab4f /MediaBrowser.Controller/Configuration/ServerApplicationPaths.cs | |
| parent | 1187222842d880aa8c6dcd2f4ca13ad5ccd31381 (diff) | |
Extract ffmpeg during init
Diffstat (limited to 'MediaBrowser.Controller/Configuration/ServerApplicationPaths.cs')
| -rw-r--r-- | MediaBrowser.Controller/Configuration/ServerApplicationPaths.cs | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/MediaBrowser.Controller/Configuration/ServerApplicationPaths.cs b/MediaBrowser.Controller/Configuration/ServerApplicationPaths.cs index b0c4904c9..874e97aed 100644 --- a/MediaBrowser.Controller/Configuration/ServerApplicationPaths.cs +++ b/MediaBrowser.Controller/Configuration/ServerApplicationPaths.cs @@ -1,5 +1,4 @@ using System.IO;
-using System.Reflection;
using MediaBrowser.Common.Configuration;
namespace MediaBrowser.Controller.Configuration
@@ -227,24 +226,7 @@ namespace MediaBrowser.Controller.Configuration {
if (_FFMpegPath == null)
{
- string filename = "ffmpeg.exe";
-
- _FFMpegPath = Path.Combine(FFMpegDirectory, filename);
-
- // Always re-extract the first time to handle new versions
- if (File.Exists(_FFMpegPath))
- {
- File.Delete(_FFMpegPath);
- }
-
- // Extract exe
- using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("MediaBrowser.Controller.FFMpeg." + filename))
- {
- using (FileStream fileStream = new FileStream(_FFMpegPath, FileMode.Create))
- {
- stream.CopyTo(fileStream);
- }
- }
+ _FFMpegPath = Path.Combine(FFMpegDirectory, "ffmpeg.exe");
}
return _FFMpegPath;
@@ -261,24 +243,7 @@ namespace MediaBrowser.Controller.Configuration {
if (_FFProbePath == null)
{
- string filename = "ffprobe.exe";
-
- _FFProbePath = Path.Combine(FFMpegDirectory, filename);
-
- /*// Always re-extract the first time to handle new versions
- if (File.Exists(_FFProbePath))
- {
- File.Delete(_FFProbePath);
- }
-
- // Extract exe
- using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("MediaBrowser.Controller.FFMpeg." + filename))
- {
- using (FileStream fileStream = new FileStream(_FFProbePath, FileMode.Create))
- {
- stream.CopyTo(fileStream);
- }
- }*/
+ _FFProbePath = Path.Combine(FFMpegDirectory, "ffprobe.exe");
}
return _FFProbePath;
|
