From 19a4dd83c21db931edf14a0ef547219ef93cdc84 Mon Sep 17 00:00:00 2001 From: LukePulverenti Luke Pulverenti luke pulverenti Date: Mon, 20 Aug 2012 09:36:18 -0400 Subject: Extract ffmpeg during init --- .../Configuration/ServerApplicationPaths.cs | 39 ++-------------------- 1 file changed, 2 insertions(+), 37 deletions(-) (limited to 'MediaBrowser.Controller/Configuration/ServerApplicationPaths.cs') 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; -- cgit v1.2.3