diff options
| author | Mark Monteiro <marknr.monteiro@protonmail.com> | 2020-05-17 13:50:44 -0400 |
|---|---|---|
| committer | Mark Monteiro <marknr.monteiro@protonmail.com> | 2020-05-17 13:50:44 -0400 |
| commit | 96acd6481efb25c6f23bc9dd92adaa8da637ab0b (patch) | |
| tree | 6c72c60a99e0376fd17980651b1f0f888270f028 /Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs | |
| parent | 0fb78cf54b51843c54e7ff59d191c490a5b196cd (diff) | |
| parent | 4b4b50f3eedc5be92786cc9d4e0d244999107426 (diff) | |
Merge branch 'master' into externalid-type
Diffstat (limited to 'Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs')
| -rw-r--r-- | Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs index 9d87316e4..6a1afced7 100644 --- a/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs @@ -8,6 +8,7 @@ using MediaBrowser.Common.Updates; using MediaBrowser.Model.Net; using MediaBrowser.Model.Tasks; using Microsoft.Extensions.Logging; +using MediaBrowser.Model.Globalization; namespace Emby.Server.Implementations.ScheduledTasks { @@ -22,11 +23,13 @@ namespace Emby.Server.Implementations.ScheduledTasks private readonly ILogger _logger; private readonly IInstallationManager _installationManager; + private readonly ILocalizationManager _localization; - public PluginUpdateTask(ILogger<PluginUpdateTask> logger, IInstallationManager installationManager) + public PluginUpdateTask(ILogger<PluginUpdateTask> logger, IInstallationManager installationManager, ILocalizationManager localization) { _logger = logger; _installationManager = installationManager; + _localization = localization; } /// <summary> @@ -52,9 +55,8 @@ namespace Emby.Server.Implementations.ScheduledTasks { progress.Report(0); - var packagesToInstall = await _installationManager.GetAvailablePluginUpdates(cancellationToken) - .ToListAsync(cancellationToken) - .ConfigureAwait(false); + var packageFetchTask = _installationManager.GetAvailablePluginUpdates(cancellationToken); + var packagesToInstall = (await packageFetchTask.ConfigureAwait(false)).ToList(); progress.Report(10); @@ -96,13 +98,13 @@ namespace Emby.Server.Implementations.ScheduledTasks } /// <inheritdoc /> - public string Name => "Update Plugins"; + public string Name => _localization.GetLocalizedString("TaskUpdatePlugins"); /// <inheritdoc /> - public string Description => "Downloads and installs updates for plugins that are configured to update automatically."; + public string Description => _localization.GetLocalizedString("TaskUpdatePluginsDescription"); /// <inheritdoc /> - public string Category => "Application"; + public string Category => _localization.GetLocalizedString("TasksApplicationCategory"); /// <inheritdoc /> public string Key => "PluginUpdates"; |
