diff options
Diffstat (limited to 'MediaBrowser.Common/Configuration')
3 files changed, 27 insertions, 3 deletions
diff --git a/MediaBrowser.Common/Configuration/EncodingConfigurationExtensions.cs b/MediaBrowser.Common/Configuration/EncodingConfigurationExtensions.cs index 70a4fe409..78e96ab47 100644 --- a/MediaBrowser.Common/Configuration/EncodingConfigurationExtensions.cs +++ b/MediaBrowser.Common/Configuration/EncodingConfigurationExtensions.cs @@ -35,8 +35,7 @@ namespace MediaBrowser.Common.Configuration transcodingTempPath = Path.Combine(configurationManager.CommonApplicationPaths.CachePath, "transcodes"); } - // Make sure the directory exists - Directory.CreateDirectory(transcodingTempPath); + configurationManager.CommonApplicationPaths.CreateAndCheckMarker(transcodingTempPath, "transcode", true); return transcodingTempPath; } } diff --git a/MediaBrowser.Common/Configuration/IApplicationPaths.cs b/MediaBrowser.Common/Configuration/IApplicationPaths.cs index 57c654667..6d1a72b04 100644 --- a/MediaBrowser.Common/Configuration/IApplicationPaths.cs +++ b/MediaBrowser.Common/Configuration/IApplicationPaths.cs @@ -84,5 +84,30 @@ namespace MediaBrowser.Common.Configuration /// </summary> /// <value>The magic string used for virtual path manipulation.</value> string VirtualDataPath { get; } + + /// <summary> + /// Gets the path used for storing trickplay files. + /// </summary> + /// <value>The trickplay path.</value> + string TrickplayPath { get; } + + /// <summary> + /// Gets the path used for storing backup archives. + /// </summary> + /// <value>The backup path.</value> + string BackupPath { get; } + + /// <summary> + /// Checks and creates all known base paths. + /// </summary> + void MakeSanityCheckOrThrow(); + + /// <summary> + /// Checks and creates the given path and adds it with a marker file if non existant. + /// </summary> + /// <param name="path">The path to check.</param> + /// <param name="markerName">The common marker file name.</param> + /// <param name="recursive">Check for other settings paths recursivly.</param> + void CreateAndCheckMarker(string path, string markerName, bool recursive = false); } } diff --git a/MediaBrowser.Common/Configuration/IConfigurationManager.cs b/MediaBrowser.Common/Configuration/IConfigurationManager.cs index e6696a571..18a8d3e7b 100644 --- a/MediaBrowser.Common/Configuration/IConfigurationManager.cs +++ b/MediaBrowser.Common/Configuration/IConfigurationManager.cs @@ -61,7 +61,7 @@ namespace MediaBrowser.Common.Configuration object GetConfiguration(string key); /// <summary> - /// Gets the array of coniguration stores. + /// Gets the array of configuration stores. /// </summary> /// <returns>Array of ConfigurationStore.</returns> ConfigurationStore[] GetConfigurationStores(); |
