added /users/public endpoint

This commit is contained in:
Luke Pulverenti
2013-07-08 13:13:18 -04:00
parent 56eea6a626
commit 1a0a50c8ab
5 changed files with 41 additions and 10 deletions

View File

@@ -571,14 +571,8 @@ namespace MediaBrowser.Common.Implementations
/// <param name="cancellationToken">The cancellation token.</param>
/// <param name="progress">The progress.</param>
/// <returns>Task{CheckForUpdateResult}.</returns>
public virtual async Task<CheckForUpdateResult> CheckForApplicationUpdate(CancellationToken cancellationToken, IProgress<double> progress)
{
var availablePackages = await PackageManager.GetAvailablePackagesWithoutRegistrationInfo(CancellationToken.None).ConfigureAwait(false);
var version = InstallationManager.GetLatestCompatibleVersion(availablePackages, Constants.Constants.MbServerPkgName, ConfigurationManager.CommonConfiguration.SystemUpdateLevel);
return version != null ? new CheckForUpdateResult { AvailableVersion = version.version, IsUpdateAvailable = version.version > ApplicationVersion, Package = version } :
new CheckForUpdateResult { AvailableVersion = ApplicationVersion, IsUpdateAvailable = false };
}
public abstract Task<CheckForUpdateResult> CheckForApplicationUpdate(CancellationToken cancellationToken,
IProgress<double> progress);
/// <summary>
/// Updates the application.