add standalone EncodingOptions

This commit is contained in:
Luke Pulverenti
2014-12-21 14:40:37 -05:00
parent 74520804f8
commit 97ae93fe5e
16 changed files with 113 additions and 182 deletions

View File

@@ -32,7 +32,6 @@ namespace MediaBrowser.Server.Implementations.Configuration
: base(applicationPaths, logManager, xmlSerializer)
{
UpdateItemsByNamePath();
UpdateTranscodingTempPath();
UpdateMetadataPath();
}
@@ -71,7 +70,6 @@ namespace MediaBrowser.Server.Implementations.Configuration
protected override void OnConfigurationUpdated()
{
UpdateItemsByNamePath();
UpdateTranscodingTempPath();
UpdateMetadataPath();
base.OnConfigurationUpdated();
@@ -97,16 +95,6 @@ namespace MediaBrowser.Server.Implementations.Configuration
Configuration.MetadataPath;
}
/// <summary>
/// Updates the transcoding temporary path.
/// </summary>
private void UpdateTranscodingTempPath()
{
((ServerApplicationPaths)ApplicationPaths).TranscodingTempPath = string.IsNullOrEmpty(Configuration.TranscodingTempPath) ?
null :
Configuration.TranscodingTempPath;
}
/// <summary>
/// Replaces the configuration.
/// </summary>
@@ -117,7 +105,6 @@ namespace MediaBrowser.Server.Implementations.Configuration
var newConfig = (ServerConfiguration)newConfiguration;
ValidateItemByNamePath(newConfig);
ValidateTranscodingTempPath(newConfig);
ValidatePathSubstitutions(newConfig);
ValidateMetadataPath(newConfig);
@@ -157,26 +144,6 @@ namespace MediaBrowser.Server.Implementations.Configuration
}
}
/// <summary>
/// Validates the transcoding temporary path.
/// </summary>
/// <param name="newConfig">The new configuration.</param>
/// <exception cref="DirectoryNotFoundException"></exception>
private void ValidateTranscodingTempPath(ServerConfiguration newConfig)
{
var newPath = newConfig.TranscodingTempPath;
if (!string.IsNullOrWhiteSpace(newPath)
&& !string.Equals(Configuration.TranscodingTempPath ?? string.Empty, newPath))
{
// Validate
if (!Directory.Exists(newPath))
{
throw new DirectoryNotFoundException(string.Format("{0} does not exist.", newPath));
}
}
}
/// <summary>
/// Validates the metadata path.
/// </summary>