From c81388689e03c40987b00dfd629150eb85494554 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 26 Jan 2016 13:19:05 -0500 Subject: deprecate options Conflicts: MediaBrowser.Api/StartupWizardService.cs --- .../Configuration/ServerConfigurationManager.cs | 27 ++-------------------- 1 file changed, 2 insertions(+), 25 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs') diff --git a/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs b/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs index a7d3854e7..6b668da47 100644 --- a/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs +++ b/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs @@ -35,7 +35,6 @@ namespace MediaBrowser.Server.Implementations.Configuration public ServerConfigurationManager(IApplicationPaths applicationPaths, ILogManager logManager, IXmlSerializer xmlSerializer, IFileSystem fileSystem) : base(applicationPaths, logManager, xmlSerializer, fileSystem) { - UpdateItemsByNamePath(); UpdateMetadataPath(); } @@ -73,7 +72,6 @@ namespace MediaBrowser.Server.Implementations.Configuration /// protected override void OnConfigurationUpdated() { - UpdateItemsByNamePath(); UpdateMetadataPath(); base.OnConfigurationUpdated(); @@ -86,19 +84,6 @@ namespace MediaBrowser.Server.Implementations.Configuration UpdateTranscodingTempPath(); } - /// - /// Updates the items by name path. - /// - private void UpdateItemsByNamePath() - { - if (!Configuration.MergeMetadataAndImagesByName) - { - ((ServerApplicationPaths)ApplicationPaths).ItemsByNamePath = string.IsNullOrEmpty(Configuration.ItemsByNamePath) ? - null : - Configuration.ItemsByNamePath; - } - } - /// /// Updates the metadata path. /// @@ -121,20 +106,12 @@ namespace MediaBrowser.Server.Implementations.Configuration ((ServerApplicationPaths)ApplicationPaths).InternalMetadataPath = metadataPath; - if (Configuration.MergeMetadataAndImagesByName) - { - ((ServerApplicationPaths)ApplicationPaths).ItemsByNamePath = ((ServerApplicationPaths)ApplicationPaths).InternalMetadataPath; - } + ((ServerApplicationPaths)ApplicationPaths).ItemsByNamePath = ((ServerApplicationPaths)ApplicationPaths).InternalMetadataPath; } private string GetInternalMetadataPath() { - if (Configuration.EnableStandaloneMetadata) - { - return Path.Combine(ApplicationPaths.ProgramDataPath, "metadata"); - } - - return null; + return Path.Combine(ApplicationPaths.ProgramDataPath, "metadata"); } /// -- cgit v1.2.3 From 106a2f3e1a0bfee9e056ef22b94599c7b2a47530 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 27 Jan 2016 01:31:31 -0500 Subject: add back MergeMetadataAndImagesByName Conflicts: MediaBrowser.Model/Configuration/ServerConfiguration.cs --- MediaBrowser.Api/StartupWizardService.cs | 1 + MediaBrowser.Model/Configuration/ServerConfiguration.cs | 2 ++ .../Configuration/ServerConfigurationManager.cs | 15 +++++++++++++++ 3 files changed, 18 insertions(+) (limited to 'MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs') diff --git a/MediaBrowser.Api/StartupWizardService.cs b/MediaBrowser.Api/StartupWizardService.cs index 554d63ac1..b05a1bd20 100644 --- a/MediaBrowser.Api/StartupWizardService.cs +++ b/MediaBrowser.Api/StartupWizardService.cs @@ -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(); } diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index 77bce5cbd..91e20c3e0 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -180,6 +180,8 @@ namespace MediaBrowser.Model.Configuration /// The dashboard source path. public string DashboardSourcePath { get; set; } + public bool MergeMetadataAndImagesByName { get; set; } + /// /// Gets or sets the image saving convention. /// diff --git a/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs b/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs index 6b668da47..d7df37332 100644 --- a/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs +++ b/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs @@ -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 /// protected override void OnConfigurationUpdated() { + UpdateItemsByNamePath(); UpdateMetadataPath(); base.OnConfigurationUpdated(); @@ -84,6 +86,19 @@ namespace MediaBrowser.Server.Implementations.Configuration UpdateTranscodingTempPath(); } + /// + /// Updates the items by name path. + /// + private void UpdateItemsByNamePath() + { + if (!Configuration.MergeMetadataAndImagesByName) + { + ((ServerApplicationPaths)ApplicationPaths).ItemsByNamePath = string.IsNullOrEmpty(Configuration.ItemsByNamePath) ? + null : + Configuration.ItemsByNamePath; + } + } + /// /// Updates the metadata path. /// -- cgit v1.2.3