cleanup method signatures

This commit is contained in:
Luke Pulverenti 2013-08-16 14:59:37 -04:00
parent 7c0f97d56b
commit a78ed5c61f
4 changed files with 4 additions and 26 deletions

View File

@ -132,7 +132,7 @@ namespace MediaBrowser.Api
if (request.PackageType == PackageType.UserInstalled || request.PackageType == PackageType.All) if (request.PackageType == PackageType.UserInstalled || request.PackageType == PackageType.All)
{ {
result.AddRange(_installationManager.GetAvailablePluginUpdatesWithoutRegistrationInfo(false, CancellationToken.None).Result.ToList()); result.AddRange(_installationManager.GetAvailablePluginUpdates(false, CancellationToken.None).Result.ToList());
} }
else if (request.PackageType == PackageType.System || request.PackageType == PackageType.All) else if (request.PackageType == PackageType.System || request.PackageType == PackageType.All)

View File

@ -276,26 +276,12 @@ namespace MediaBrowser.Common.Implementations.Updates
} }
/// <summary> /// <summary>
/// Gets the available plugin updates including registration information for each one. /// Gets the available plugin updates.
/// Used with API and catalog.
/// </summary> /// </summary>
/// <param name="withAutoUpdateEnabled">if set to <c>true</c> [with auto update enabled].</param> /// <param name="withAutoUpdateEnabled">if set to <c>true</c> [with auto update enabled].</param>
/// <param name="cancellationToken">The cancellation token.</param> /// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{IEnumerable{PackageVersionInfo}}.</returns> /// <returns>Task{IEnumerable{PackageVersionInfo}}.</returns>
public async Task<IEnumerable<PackageVersionInfo>> GetAvailablePluginUpdates(bool withAutoUpdateEnabled, CancellationToken cancellationToken) public async Task<IEnumerable<PackageVersionInfo>> GetAvailablePluginUpdates(bool withAutoUpdateEnabled, CancellationToken cancellationToken)
{
var catalog = await GetAvailablePackages(cancellationToken).ConfigureAwait(false);
return FilterCatalog(catalog, withAutoUpdateEnabled);
}
/// <summary>
/// Gets the available plugin updates from a static resource - no registration information.
/// Used for update checks.
/// </summary>
/// <param name="withAutoUpdateEnabled">if set to <c>true</c> [with auto update enabled].</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{IEnumerable{PackageVersionInfo}}.</returns>
public async Task<IEnumerable<PackageVersionInfo>> GetAvailablePluginUpdatesWithoutRegistrationInfo(bool withAutoUpdateEnabled, CancellationToken cancellationToken)
{ {
var catalog = await GetAvailablePackagesWithoutRegistrationInfo(cancellationToken).ConfigureAwait(false); var catalog = await GetAvailablePackagesWithoutRegistrationInfo(cancellationToken).ConfigureAwait(false);
return FilterCatalog(catalog, withAutoUpdateEnabled); return FilterCatalog(catalog, withAutoUpdateEnabled);

View File

@ -90,21 +90,13 @@ namespace MediaBrowser.Common.Updates
PackageVersionInfo GetLatestCompatibleVersion(IEnumerable<PackageInfo> availablePackages, string name, PackageVersionClass classification = PackageVersionClass.Release); PackageVersionInfo GetLatestCompatibleVersion(IEnumerable<PackageInfo> availablePackages, string name, PackageVersionClass classification = PackageVersionClass.Release);
/// <summary> /// <summary>
/// Gets the available plugin updates including registration info. /// Gets the available plugin updates.
/// </summary> /// </summary>
/// <param name="withAutoUpdateEnabled">if set to <c>true</c> [with auto update enabled].</param> /// <param name="withAutoUpdateEnabled">if set to <c>true</c> [with auto update enabled].</param>
/// <param name="cancellationToken">The cancellation token.</param> /// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{IEnumerable{PackageVersionInfo}}.</returns> /// <returns>Task{IEnumerable{PackageVersionInfo}}.</returns>
Task<IEnumerable<PackageVersionInfo>> GetAvailablePluginUpdates(bool withAutoUpdateEnabled, CancellationToken cancellationToken); Task<IEnumerable<PackageVersionInfo>> GetAvailablePluginUpdates(bool withAutoUpdateEnabled, CancellationToken cancellationToken);
/// <summary>
/// Gets the available plugin updates from a static resource (not including registration info).
/// </summary>
/// <param name="withAutoUpdateEnabled">if set to <c>true</c> [with auto update enabled].</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{IEnumerable{PackageVersionInfo}}.</returns>
Task<IEnumerable<PackageVersionInfo>> GetAvailablePluginUpdatesWithoutRegistrationInfo(bool withAutoUpdateEnabled, CancellationToken cancellationToken);
/// <summary> /// <summary>
/// Installs the package. /// Installs the package.
/// </summary> /// </summary>

View File

@ -60,7 +60,7 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks
{ {
progress.Report(0); progress.Report(0);
var packagesToInstall = (await _installationManager.GetAvailablePluginUpdatesWithoutRegistrationInfo(true, cancellationToken).ConfigureAwait(false)).ToList(); var packagesToInstall = (await _installationManager.GetAvailablePluginUpdates(true, cancellationToken).ConfigureAwait(false)).ToList();
progress.Report(10); progress.Report(10);