diff --git a/MediaBrowser.Api/PackageService.cs b/MediaBrowser.Api/PackageService.cs index 88d2e9263..0e1a37709 100644 --- a/MediaBrowser.Api/PackageService.cs +++ b/MediaBrowser.Api/PackageService.cs @@ -132,7 +132,7 @@ namespace MediaBrowser.Api if (request.PackageType == PackageType.UserInstalled || request.PackageType == PackageType.All) { - result.AddRange(_installationManager.GetAvailablePluginUpdates(false, CancellationToken.None).Result.ToList()); + result.AddRange(_installationManager.GetAvailablePluginUpdatesWithoutRegistrationInfo(false, CancellationToken.None).Result.ToList()); } else if (request.PackageType == PackageType.System || request.PackageType == PackageType.All) diff --git a/MediaBrowser.Common.Implementations/Updates/PackageManager.cs b/MediaBrowser.Common.Implementations/Updates/PackageManager.cs index 81262daf6..34cc322ab 100644 --- a/MediaBrowser.Common.Implementations/Updates/PackageManager.cs +++ b/MediaBrowser.Common.Implementations/Updates/PackageManager.cs @@ -70,7 +70,7 @@ namespace MediaBrowser.Common.Implementations.Updates /// /// /// - public async Task> GetAvailablePackagesStatic(CancellationToken cancellationToken) + public async Task> GetAvailablePackagesWithoutRegistrationInfo(CancellationToken cancellationToken) { using (var json = await _httpClient.Get(Constants.Constants.MbAdminUrl + "service/MB3Packages.json", cancellationToken).ConfigureAwait(false)) { diff --git a/MediaBrowser.Common/Updates/IPackageManager.cs b/MediaBrowser.Common/Updates/IPackageManager.cs index 4a2db06d1..06bdf46e1 100644 --- a/MediaBrowser.Common/Updates/IPackageManager.cs +++ b/MediaBrowser.Common/Updates/IPackageManager.cs @@ -20,7 +20,7 @@ namespace MediaBrowser.Common.Updates /// /// The cancellation token. /// Task{List{PackageInfo}}. - Task> GetAvailablePackagesStatic(CancellationToken cancellationToken); + Task> GetAvailablePackagesWithoutRegistrationInfo(CancellationToken cancellationToken); /// /// Installs a package. diff --git a/MediaBrowser.Controller/Updates/IInstallationManager.cs b/MediaBrowser.Controller/Updates/IInstallationManager.cs index 791150276..c7f064279 100644 --- a/MediaBrowser.Controller/Updates/IInstallationManager.cs +++ b/MediaBrowser.Controller/Updates/IInstallationManager.cs @@ -92,7 +92,7 @@ namespace MediaBrowser.Controller.Updates /// if set to true [with auto update enabled]. /// The cancellation token. /// Task{IEnumerable{PackageVersionInfo}}. - Task> GetAvailablePluginUpdatesStatic(bool withAutoUpdateEnabled, CancellationToken cancellationToken); + Task> GetAvailablePluginUpdatesWithoutRegistrationInfo(bool withAutoUpdateEnabled, CancellationToken cancellationToken); /// /// Installs the package. diff --git a/MediaBrowser.Server.Implementations/ScheduledTasks/PluginUpdateTask.cs b/MediaBrowser.Server.Implementations/ScheduledTasks/PluginUpdateTask.cs index 3a0a86526..980d27899 100644 --- a/MediaBrowser.Server.Implementations/ScheduledTasks/PluginUpdateTask.cs +++ b/MediaBrowser.Server.Implementations/ScheduledTasks/PluginUpdateTask.cs @@ -60,7 +60,7 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks { progress.Report(0); - var packagesToInstall = (await _installationManager.GetAvailablePluginUpdatesStatic(true, cancellationToken).ConfigureAwait(false)).ToList(); + var packagesToInstall = (await _installationManager.GetAvailablePluginUpdatesWithoutRegistrationInfo(true, cancellationToken).ConfigureAwait(false)).ToList(); progress.Report(10); diff --git a/MediaBrowser.Server.Implementations/Updates/InstallationManager.cs b/MediaBrowser.Server.Implementations/Updates/InstallationManager.cs index 4dd9c47d1..45988c9ec 100644 --- a/MediaBrowser.Server.Implementations/Updates/InstallationManager.cs +++ b/MediaBrowser.Server.Implementations/Updates/InstallationManager.cs @@ -181,11 +181,11 @@ namespace MediaBrowser.Server.Implementations.Updates /// Type of the package. /// The application version. /// Task{List{PackageInfo}}. - protected async Task> GetAvailablePackagesStatic(CancellationToken cancellationToken, + protected async Task> GetAvailablePackagesWithoutRegistrationInfo(CancellationToken cancellationToken, PackageType? packageType = null, Version applicationVersion = null) { - var packages = (await _packageManager.GetAvailablePackagesStatic(cancellationToken).ConfigureAwait(false)).ToList(); + var packages = (await _packageManager.GetAvailablePackagesWithoutRegistrationInfo(cancellationToken).ConfigureAwait(false)).ToList(); return FilterPackages(packages, packageType, applicationVersion); } @@ -304,9 +304,9 @@ namespace MediaBrowser.Server.Implementations.Updates /// if set to true [with auto update enabled]. /// The cancellation token. /// Task{IEnumerable{PackageVersionInfo}}. - public async Task> GetAvailablePluginUpdatesStatic(bool withAutoUpdateEnabled, CancellationToken cancellationToken) + public async Task> GetAvailablePluginUpdatesWithoutRegistrationInfo(bool withAutoUpdateEnabled, CancellationToken cancellationToken) { - var catalog = await GetAvailablePackagesStatic(cancellationToken).ConfigureAwait(false); + var catalog = await GetAvailablePackagesWithoutRegistrationInfo(cancellationToken).ConfigureAwait(false); return FilterCatalog(catalog, withAutoUpdateEnabled); } diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs index 0d6c5ed35..ca2ab1be4 100644 --- a/MediaBrowser.ServerApplication/ApplicationHost.cs +++ b/MediaBrowser.ServerApplication/ApplicationHost.cs @@ -474,7 +474,7 @@ namespace MediaBrowser.ServerApplication /// Task{CheckForUpdateResult}. public async override Task CheckForApplicationUpdate(CancellationToken cancellationToken, IProgress progress) { - var availablePackages = await PackageManager.GetAvailablePackagesStatic(CancellationToken.None).ConfigureAwait(false); + var availablePackages = await PackageManager.GetAvailablePackagesWithoutRegistrationInfo(CancellationToken.None).ConfigureAwait(false); var version = InstallationManager.GetLatestCompatibleVersion(availablePackages, Constants.MbServerPkgName, ConfigurationManager.CommonConfiguration.SystemUpdateLevel); return version != null ? new CheckForUpdateResult { AvailableVersion = version.version, IsUpdateAvailable = version.version > ApplicationVersion, Package = version } :