diff --git a/MediaBrowser.Api/PackageService.cs b/MediaBrowser.Api/PackageService.cs index 5ef8b0987..4f9efad50 100644 --- a/MediaBrowser.Api/PackageService.cs +++ b/MediaBrowser.Api/PackageService.cs @@ -190,7 +190,7 @@ namespace MediaBrowser.Api /// System.Object. public async Task Get(GetPackages request) { - var packages = await _installationManager.GetAvailablePackages(CancellationToken.None, request.PackageType, _appHost.ApplicationVersion).ConfigureAwait(false); + var packages = await _installationManager.GetAvailablePackages(CancellationToken.None, false, request.PackageType, _appHost.ApplicationVersion).ConfigureAwait(false); if (!string.IsNullOrEmpty(request.TargetSystems)) { diff --git a/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs b/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs index 23785083b..5f205d69e 100644 --- a/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs +++ b/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs @@ -149,10 +149,12 @@ namespace MediaBrowser.Common.Implementations.Updates /// Gets all available packages. /// /// The cancellation token. + /// if set to true [with registration]. /// Type of the package. /// The application version. /// Task{List{PackageInfo}}. public async Task> GetAvailablePackages(CancellationToken cancellationToken, + bool withRegistration = true, PackageType? packageType = null, Version applicationVersion = null) { @@ -163,13 +165,22 @@ namespace MediaBrowser.Common.Implementations.Updates { "systemid", _applicationHost.SystemId } }; - using (var json = await _httpClient.Post(MbAdmin.HttpsUrl + "service/package/retrieveall", data, cancellationToken).ConfigureAwait(false)) + if (withRegistration) { - cancellationToken.ThrowIfCancellationRequested(); + using (var json = await _httpClient.Post(MbAdmin.HttpsUrl + "service/package/retrieveall", data, cancellationToken).ConfigureAwait(false)) + { + cancellationToken.ThrowIfCancellationRequested(); - var packages = _jsonSerializer.DeserializeFromStream>(json).ToList(); + var packages = _jsonSerializer.DeserializeFromStream>(json).ToList(); - return FilterPackages(packages, packageType, applicationVersion); + return FilterPackages(packages, packageType, applicationVersion); + } + } + else + { + var packages = await GetAvailablePackagesWithoutRegistrationInfo(cancellationToken).ConfigureAwait(false); + + return FilterPackages(packages.ToList(), packageType, applicationVersion); } } diff --git a/MediaBrowser.Common/Updates/IInstallationManager.cs b/MediaBrowser.Common/Updates/IInstallationManager.cs index 592613c54..7d721da6f 100644 --- a/MediaBrowser.Common/Updates/IInstallationManager.cs +++ b/MediaBrowser.Common/Updates/IInstallationManager.cs @@ -45,10 +45,12 @@ namespace MediaBrowser.Common.Updates /// Gets all available packages. /// /// The cancellation token. + /// if set to true [with registration]. /// Type of the package. /// The application version. /// Task{List{PackageInfo}}. Task> GetAvailablePackages(CancellationToken cancellationToken, + bool withRegistration = true, PackageType? packageType = null, Version applicationVersion = null); diff --git a/SharedVersion.cs b/SharedVersion.cs index d77ca5d8f..cfb95ba5e 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,4 +1,4 @@ using System.Reflection; -//[assembly: AssemblyVersion("3.0.*")] -[assembly: AssemblyVersion("3.0.5713.1")] +[assembly: AssemblyVersion("3.0.*")] +//[assembly: AssemblyVersion("3.0.5713.1")]