aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2019-11-13 21:12:52 +0900
committerGitHub <noreply@github.com>2019-11-13 21:12:52 +0900
commit0b02c776911f29de5c3a891c6e49082b0d144318 (patch)
treec299c50a6f9ab93c362bd55db990fa5d24806664 /Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
parentf51f59d675e863ae5537416dbebfb2fd738e7a63 (diff)
parent03fe0e762d77262fab3221abcffe8b4c290060bd (diff)
Merge pull request #1864 from Bond-009/installationmanager
Improve IInstallationManager interface
Diffstat (limited to 'Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs')
-rw-r--r--Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs24
1 files changed, 15 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
index 7afeba9dd..fe8deae59 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs
@@ -1,24 +1,23 @@
-using MediaBrowser.Common.Updates;
-using MediaBrowser.Model.Net;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-using MediaBrowser.Common.Progress;
+using MediaBrowser.Common.Updates;
+using MediaBrowser.Model.Net;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.ScheduledTasks
{
/// <summary>
- /// Plugin Update Task
+ /// Plugin Update Task.
/// </summary>
public class PluginUpdateTask : IScheduledTask, IConfigurableScheduledTask
{
/// <summary>
- /// The _logger
+ /// The _logger.
/// </summary>
private readonly ILogger _logger;
@@ -31,7 +30,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
}
/// <summary>
- /// Creates the triggers that define when the task will run
+ /// Creates the triggers that define when the task will run.
/// </summary>
/// <returns>IEnumerable{BaseTaskTrigger}.</returns>
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
@@ -44,16 +43,16 @@ namespace Emby.Server.Implementations.ScheduledTasks
}
/// <summary>
- /// Update installed plugins
+ /// Update installed plugins.
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
/// <param name="progress">The progress.</param>
- /// <returns>Task.</returns>
+ /// <returns><see cref="Task" />.</returns>
public async Task Execute(CancellationToken cancellationToken, IProgress<double> progress)
{
progress.Report(0);
- var packagesToInstall = (await _installationManager.GetAvailablePluginUpdates(typeof(PluginUpdateTask).Assembly.GetName().Version, true, cancellationToken).ConfigureAwait(false)).ToList();
+ var packagesToInstall = (await _installationManager.GetAvailablePluginUpdates(cancellationToken).ConfigureAwait(false)).ToList();
progress.Report(10);
@@ -94,18 +93,25 @@ namespace Emby.Server.Implementations.ScheduledTasks
progress.Report(100);
}
+ /// <inheritdoc />
public string Name => "Check for plugin updates";
+ /// <inheritdoc />
public string Description => "Downloads and installs updates for plugins that are configured to update automatically.";
+ /// <inheritdoc />
public string Category => "Application";
+ /// <inheritdoc />
public string Key => "PluginUpdates";
+ /// <inheritdoc />
public bool IsHidden => false;
+ /// <inheritdoc />
public bool IsEnabled => true;
+ /// <inheritdoc />
public bool IsLogged => true;
}
}