From d794eecec4f4b9a46df422b28c86e136bfd92abf Mon Sep 17 00:00:00 2001 From: LukePulverenti Luke Pulverenti luke pulverenti Date: Sun, 19 Aug 2012 11:58:35 -0400 Subject: Added initial implementation of the metadata provider network, along with the first few providers --- .../Configuration/ServerApplicationPaths.cs | 48 +++++++++++++++++++++- 1 file changed, 46 insertions(+), 2 deletions(-) (limited to 'MediaBrowser.Controller/Configuration/ServerApplicationPaths.cs') diff --git a/MediaBrowser.Controller/Configuration/ServerApplicationPaths.cs b/MediaBrowser.Controller/Configuration/ServerApplicationPaths.cs index e008f7b17..b0c4904c9 100644 --- a/MediaBrowser.Controller/Configuration/ServerApplicationPaths.cs +++ b/MediaBrowser.Controller/Configuration/ServerApplicationPaths.cs @@ -151,6 +151,50 @@ namespace MediaBrowser.Controller.Configuration } } + private string _CacheDirectory = null; + /// + /// Gets the folder path to the cache directory + /// + public string CacheDirectory + { + get + { + if (_CacheDirectory == null) + { + _CacheDirectory = Path.Combine(Kernel.Instance.ApplicationPaths.ProgramDataPath, "cache"); + + if (!Directory.Exists(_CacheDirectory)) + { + Directory.CreateDirectory(_CacheDirectory); + } + } + + return _CacheDirectory; + } + } + + private string _FFProbeAudioCacheDirectory = null; + /// + /// Gets the folder path to the ffprobe audio cache directory + /// + public string FFProbeAudioCacheDirectory + { + get + { + if (_FFProbeAudioCacheDirectory == null) + { + _FFProbeAudioCacheDirectory = Path.Combine(Kernel.Instance.ApplicationPaths.CacheDirectory, "ffprobe-audio"); + + if (!Directory.Exists(_FFProbeAudioCacheDirectory)) + { + Directory.CreateDirectory(_FFProbeAudioCacheDirectory); + } + } + + return _FFProbeAudioCacheDirectory; + } + } + private string _FFMpegDirectory = null; /// /// Gets the folder path to ffmpeg @@ -221,7 +265,7 @@ namespace MediaBrowser.Controller.Configuration _FFProbePath = Path.Combine(FFMpegDirectory, filename); - // Always re-extract the first time to handle new versions + /*// Always re-extract the first time to handle new versions if (File.Exists(_FFProbePath)) { File.Delete(_FFProbePath); @@ -234,7 +278,7 @@ namespace MediaBrowser.Controller.Configuration { stream.CopyTo(fileStream); } - } + }*/ } return _FFProbePath; -- cgit v1.2.3