aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Startup.Common/Migrations/RenameXmlOptions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Startup.Common/Migrations/RenameXmlOptions.cs')
-rw-r--r--MediaBrowser.Server.Startup.Common/Migrations/RenameXmlOptions.cs61
1 files changed, 0 insertions, 61 deletions
diff --git a/MediaBrowser.Server.Startup.Common/Migrations/RenameXmlOptions.cs b/MediaBrowser.Server.Startup.Common/Migrations/RenameXmlOptions.cs
deleted file mode 100644
index 49114b96f..000000000
--- a/MediaBrowser.Server.Startup.Common/Migrations/RenameXmlOptions.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using MediaBrowser.Controller.Configuration;
-using System;
-
-namespace MediaBrowser.Server.Startup.Common.Migrations
-{
- public class RenameXmlOptions : IVersionMigration
- {
- private readonly IServerConfigurationManager _config;
-
- public RenameXmlOptions(IServerConfigurationManager config)
- {
- _config = config;
- }
-
- public void Run()
- {
- var changed = false;
-
- foreach (var option in _config.Configuration.MetadataOptions)
- {
- if (Migrate(option.DisabledMetadataSavers))
- {
- changed = true;
- }
- if (Migrate(option.LocalMetadataReaderOrder))
- {
- changed = true;
- }
- }
-
- if (changed)
- {
- _config.SaveConfiguration();
- }
- }
-
- private bool Migrate(string[] options)
- {
- var changed = false;
-
- if (options != null)
- {
- for (var i = 0; i < options.Length; i++)
- {
- if (string.Equals(options[i], "Media Browser Legacy Xml", StringComparison.OrdinalIgnoreCase))
- {
- options[i] = "Emby Xml";
- changed = true;
- }
- else if (string.Equals(options[i], "Media Browser Xml", StringComparison.OrdinalIgnoreCase))
- {
- options[i] = "Emby Xml";
- changed = true;
- }
- }
- }
-
- return changed;
- }
- }
-}