mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 06:23:03 +03:00
add standalone EncodingOptions
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user