mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 03:48:06 +02:00
add back MergeMetadataAndImagesByName
Conflicts: MediaBrowser.Model/Configuration/ServerConfiguration.cs
This commit is contained in:
parent
51cd5e90b0
commit
106a2f3e1a
3 changed files with 18 additions and 0 deletions
|
@ -71,6 +71,7 @@ namespace MediaBrowser.Api
|
|||
_config.Configuration.DisableStartupScan = true;
|
||||
_config.Configuration.EnableUserViews = true;
|
||||
_config.Configuration.EnableDateLastRefresh = true;
|
||||
_config.Configuration.MergeMetadataAndImagesByName = true;
|
||||
_config.SaveConfiguration();
|
||||
}
|
||||
|
||||
|
|
|
@ -180,6 +180,8 @@ namespace MediaBrowser.Model.Configuration
|
|||
/// <value>The dashboard source path.</value>
|
||||
public string DashboardSourcePath { get; set; }
|
||||
|
||||
public bool MergeMetadataAndImagesByName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the image saving convention.
|
||||
/// </summary>
|
||||
|
|
|
@ -35,6 +35,7 @@ namespace MediaBrowser.Server.Implementations.Configuration
|
|||
public ServerConfigurationManager(IApplicationPaths applicationPaths, ILogManager logManager, IXmlSerializer xmlSerializer, IFileSystem fileSystem)
|
||||
: base(applicationPaths, logManager, xmlSerializer, fileSystem)
|
||||
{
|
||||
UpdateItemsByNamePath();
|
||||
UpdateMetadataPath();
|
||||
}
|
||||
|
||||
|
@ -72,6 +73,7 @@ namespace MediaBrowser.Server.Implementations.Configuration
|
|||
/// </summary>
|
||||
protected override void OnConfigurationUpdated()
|
||||
{
|
||||
UpdateItemsByNamePath();
|
||||
UpdateMetadataPath();
|
||||
|
||||
base.OnConfigurationUpdated();
|
||||
|
@ -84,6 +86,19 @@ namespace MediaBrowser.Server.Implementations.Configuration
|
|||
UpdateTranscodingTempPath();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the items by name path.
|
||||
/// </summary>
|
||||
private void UpdateItemsByNamePath()
|
||||
{
|
||||
if (!Configuration.MergeMetadataAndImagesByName)
|
||||
{
|
||||
((ServerApplicationPaths)ApplicationPaths).ItemsByNamePath = string.IsNullOrEmpty(Configuration.ItemsByNamePath) ?
|
||||
null :
|
||||
Configuration.ItemsByNamePath;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the metadata path.
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in a new issue