diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-02-09 15:55:23 +0100 |
|---|---|---|
| committer | Bond-009 <bond.009@outlook.com> | 2019-02-18 16:57:08 +0100 |
| commit | 7554f6355195443b721a9b65f04ef4f9f4c097e9 (patch) | |
| tree | e5271905e548bb4d6969e4d542d831a04fcd93f7 | |
| parent | 25253cf961e4309cef49612f1a729ab69507b604 (diff) | |
Remove more self-update code
| -rw-r--r-- | Emby.Notifications/Notifications.cs | 1 | ||||
| -rw-r--r-- | MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs | 16 | ||||
| -rw-r--r-- | MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs | 15 |
3 files changed, 2 insertions, 30 deletions
diff --git a/Emby.Notifications/Notifications.cs b/Emby.Notifications/Notifications.cs index 7defd8510..ec08fd193 100644 --- a/Emby.Notifications/Notifications.cs +++ b/Emby.Notifications/Notifications.cs @@ -119,7 +119,6 @@ namespace Emby.Notifications private async void _appHost_HasUpdateAvailableChanged(object sender, EventArgs e) { - // This notification is for users who can't auto-update (aka running as service) if (!_appHost.HasUpdateAvailable) { return; diff --git a/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs b/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs index 16b036912..b7e94b73f 100644 --- a/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs +++ b/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs @@ -197,16 +197,6 @@ namespace MediaBrowser.Api.ScheduledTasks throw new ResourceNotFoundException("Task not found"); } - if (string.Equals(task.ScheduledTask.Key, "SystemUpdateTask", StringComparison.OrdinalIgnoreCase)) - { - // This is a hack for now just to get the update application function to work when auto-update is disabled - if (!_config.Configuration.EnableAutoUpdate) - { - _config.Configuration.EnableAutoUpdate = true; - _config.SaveConfiguration(); - } - } - TaskManager.Execute(task, new TaskOptions()); } @@ -238,16 +228,14 @@ namespace MediaBrowser.Api.ScheduledTasks // https://code.google.com/p/servicestack/source/browse/trunk/Common/ServiceStack.Text/ServiceStack.Text/Controller/PathInfo.cs var id = GetPathValue(1); - var task = TaskManager.ScheduledTasks.FirstOrDefault(i => string.Equals(i.Id, id)); + var task = TaskManager.ScheduledTasks.FirstOrDefault(i => string.Equals(i.Id, id, StringComparison.Ordinal)); if (task == null) { throw new ResourceNotFoundException("Task not found"); } - var triggerInfos = request; - - task.Triggers = triggerInfos.ToArray(); + task.Triggers = request.ToArray(); } } } diff --git a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs index ce4ef1cfe..6a1a0f090 100644 --- a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs +++ b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs @@ -7,20 +7,6 @@ namespace MediaBrowser.Model.Configuration /// </summary> public class BaseApplicationConfiguration { - // TODO: @bond Remove? - /// <summary> - /// Gets or sets a value indicating whether [enable debug level logging]. - /// </summary> - /// <value><c>true</c> if [enable debug level logging]; otherwise, <c>false</c>.</value> - public bool EnableDebugLevelLogging { get; set; } - - /// <summary> - /// Enable automatically and silently updating of the application - /// </summary> - /// <value><c>true</c> if [enable auto update]; otherwise, <c>false</c>.</value> - public bool EnableAutoUpdate { get; set; } - - // TODO: @bond Remove? /// <summary> /// The number of days we should retain log files /// </summary> @@ -44,7 +30,6 @@ namespace MediaBrowser.Model.Configuration /// </summary> public BaseApplicationConfiguration() { - EnableAutoUpdate = true; LogFileRetentionDays = 3; } } |
