diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-08-24 16:37:34 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-08-24 16:37:34 -0400 |
| commit | 41fc1f87f57374f8bc8ce1ca1ac3c62f789a40e6 (patch) | |
| tree | 79d09a050f0c13a46eacdc35a63207164276e5ea | |
| parent | 92ff7414ae25ccd7c8ce5a09154b190094293162 (diff) | |
update plugin catalog
| -rw-r--r-- | MediaBrowser.Api/PackageService.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Common.Implementations/Updates/InstallationManager.cs | 19 | ||||
| -rw-r--r-- | MediaBrowser.Common/Updates/IInstallationManager.cs | 2 | ||||
| -rw-r--r-- | SharedVersion.cs | 4 |
4 files changed, 20 insertions, 7 deletions
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 /// <returns>System.Object.</returns> public async Task<object> 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. /// </summary> /// <param name="cancellationToken">The cancellation token.</param> + /// <param name="withRegistration">if set to <c>true</c> [with registration].</param> /// <param name="packageType">Type of the package.</param> /// <param name="applicationVersion">The application version.</param> /// <returns>Task{List{PackageInfo}}.</returns> public async Task<IEnumerable<PackageInfo>> 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<List<PackageInfo>>(json).ToList(); + var packages = _jsonSerializer.DeserializeFromStream<List<PackageInfo>>(json).ToList(); + + return FilterPackages(packages, packageType, applicationVersion); + } + } + else + { + var packages = await GetAvailablePackagesWithoutRegistrationInfo(cancellationToken).ConfigureAwait(false); - return FilterPackages(packages, packageType, applicationVersion); + 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. /// </summary> /// <param name="cancellationToken">The cancellation token.</param> + /// <param name="withRegistration">if set to <c>true</c> [with registration].</param> /// <param name="packageType">Type of the package.</param> /// <param name="applicationVersion">The application version.</param> /// <returns>Task{List{PackageInfo}}.</returns> Task<IEnumerable<PackageInfo>> 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")] |
