diff options
| author | hatharry <hatharry@hotmail.com> | 2016-08-29 01:27:43 +1200 |
|---|---|---|
| committer | hatharry <hatharry@hotmail.com> | 2016-08-29 01:27:43 +1200 |
| commit | cabf2cdc1be4c06714ac6bcf835a19d2f652a6e2 (patch) | |
| tree | d375b8a41e9fd40a2569ceea6b02e4f8237db797 /MediaBrowser.Server.Startup.Common/Migrations/FolderViewSettingMigration.cs | |
| parent | e564b54686029a90595e1bb4277f87490763e183 (diff) | |
| parent | c974641a352685b2e6595dd7b291843c8e6364ac (diff) | |
Merge branch 'dev' of https://github.com/hatharry/Emby.git
Diffstat (limited to 'MediaBrowser.Server.Startup.Common/Migrations/FolderViewSettingMigration.cs')
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/Migrations/FolderViewSettingMigration.cs | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/MediaBrowser.Server.Startup.Common/Migrations/FolderViewSettingMigration.cs b/MediaBrowser.Server.Startup.Common/Migrations/FolderViewSettingMigration.cs deleted file mode 100644 index 12054864b..000000000 --- a/MediaBrowser.Server.Startup.Common/Migrations/FolderViewSettingMigration.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System.Linq; -using MediaBrowser.Controller.Configuration; -using MediaBrowser.Controller.Library; - -namespace MediaBrowser.Server.Startup.Common.Migrations -{ - public class FolderViewSettingMigration : IVersionMigration - { - private readonly IServerConfigurationManager _config; - private readonly IUserManager _userManager; - - public FolderViewSettingMigration(IServerConfigurationManager config, IUserManager userManager) - { - _config = config; - _userManager = userManager; - } - - public void Run() - { - var migrationKey = this.GetType().Name; - var migrationKeyList = _config.Configuration.Migrations.ToList(); - - if (!migrationKeyList.Contains(migrationKey)) - { - if (_config.Configuration.IsStartupWizardCompleted) - { - if (_userManager.Users.Any(i => i.Configuration.DisplayFoldersView)) - { - _config.Configuration.EnableFolderView = true; - } - } - - migrationKeyList.Add(migrationKey); - _config.Configuration.Migrations = migrationKeyList.ToArray(); - _config.SaveConfiguration(); - } - - } - } -} |
