aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs26
1 files changed, 22 insertions, 4 deletions
diff --git a/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs b/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs
index b3b8ccbd8..bb9e9057a 100644
--- a/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs
+++ b/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs
@@ -88,9 +88,12 @@ namespace MediaBrowser.Server.Implementations.Configuration
/// </summary>
private void UpdateItemsByNamePath()
{
- ((ServerApplicationPaths)ApplicationPaths).ItemsByNamePath = string.IsNullOrEmpty(Configuration.ItemsByNamePath) ?
- null :
- Configuration.ItemsByNamePath;
+ if (!Configuration.MergeMetadataAndImagesByName)
+ {
+ ((ServerApplicationPaths)ApplicationPaths).ItemsByNamePath = string.IsNullOrEmpty(Configuration.ItemsByNamePath) ?
+ null :
+ Configuration.ItemsByNamePath;
+ }
}
/// <summary>
@@ -99,8 +102,23 @@ namespace MediaBrowser.Server.Implementations.Configuration
private void UpdateMetadataPath()
{
((ServerApplicationPaths)ApplicationPaths).InternalMetadataPath = string.IsNullOrEmpty(Configuration.MetadataPath) ?
- null :
+ GetInternalMetadataPath() :
Configuration.MetadataPath;
+
+ if (Configuration.MergeMetadataAndImagesByName)
+ {
+ ((ServerApplicationPaths)ApplicationPaths).ItemsByNamePath = ((ServerApplicationPaths)ApplicationPaths).InternalMetadataPath;
+ }
+ }
+
+ private string GetInternalMetadataPath()
+ {
+ if (Configuration.EnableStandaloneMetadata)
+ {
+ return Path.Combine(ApplicationPaths.ProgramDataPath, "metadata");
+ }
+
+ return null;
}
/// <summary>