mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 22:13:06 +03:00
add basic open subtitle configuration
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.Events;
|
||||
using MediaBrowser.Common.Implementations.Configuration;
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
@@ -29,6 +30,8 @@ namespace MediaBrowser.Server.Implementations.Configuration
|
||||
UpdateMetadataPath();
|
||||
}
|
||||
|
||||
public event EventHandler<GenericEventArgs<ServerConfiguration>> ConfigurationUpdating;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type of the configuration.
|
||||
/// </summary>
|
||||
@@ -73,8 +76,8 @@ namespace MediaBrowser.Server.Implementations.Configuration
|
||||
/// </summary>
|
||||
private void UpdateItemsByNamePath()
|
||||
{
|
||||
((ServerApplicationPaths) ApplicationPaths).ItemsByNamePath = string.IsNullOrEmpty(Configuration.ItemsByNamePath) ?
|
||||
null :
|
||||
((ServerApplicationPaths)ApplicationPaths).ItemsByNamePath = string.IsNullOrEmpty(Configuration.ItemsByNamePath) ?
|
||||
null :
|
||||
Configuration.ItemsByNamePath;
|
||||
}
|
||||
|
||||
@@ -105,13 +108,15 @@ namespace MediaBrowser.Server.Implementations.Configuration
|
||||
/// <exception cref="System.IO.DirectoryNotFoundException"></exception>
|
||||
public override void ReplaceConfiguration(BaseApplicationConfiguration newConfiguration)
|
||||
{
|
||||
var newConfig = (ServerConfiguration) newConfiguration;
|
||||
var newConfig = (ServerConfiguration)newConfiguration;
|
||||
|
||||
ValidateItemByNamePath(newConfig);
|
||||
ValidateTranscodingTempPath(newConfig);
|
||||
ValidatePathSubstitutions(newConfig);
|
||||
ValidateMetadataPath(newConfig);
|
||||
|
||||
EventHelper.FireEventIfNotNull(ConfigurationUpdating, this, new GenericEventArgs<ServerConfiguration> { Argument = newConfig }, Logger);
|
||||
|
||||
base.ReplaceConfiguration(newConfiguration);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user