consolidate connect calls

This commit is contained in:
Luke Pulverenti
2014-09-14 14:47:48 -04:00
parent 9991360d8a
commit 9ad7d5d1a9
12 changed files with 49 additions and 49 deletions

View File

@@ -261,18 +261,6 @@ namespace MediaBrowser.Server.Implementations.Connect
return user;
}
public ConnectUserLink GetUserInfo(string userId)
{
var user = GetUser(userId);
return new ConnectUserLink
{
LocalUserId = user.Id.ToString("N"),
Username = user.ConnectUserName,
UserId = user.ConnectUserId
};
}
private string GetConnectUrl(string handler)
{
return "https://connect.mediabrowser.tv/service/" + handler;

View File

@@ -86,7 +86,7 @@ namespace MediaBrowser.Server.Implementations.Library
/// </summary>
public event EventHandler<GenericEventArgs<User>> UserUpdated;
public event EventHandler<GenericEventArgs<User>> UserConfigurationUpdated;
/// <summary>
/// Called when [user updated].
/// </summary>
@@ -137,7 +137,7 @@ namespace MediaBrowser.Server.Implementations.Library
{
return GetUserById(new Guid(id));
}
public async Task Initialize()
{
Users = await LoadUsers().ConfigureAwait(false);
@@ -260,7 +260,10 @@ namespace MediaBrowser.Server.Implementations.Library
HasConfiguredPassword = hasConfiguredDefaultPassword,
LastActivityDate = user.LastActivityDate,
LastLoginDate = user.LastLoginDate,
Configuration = user.Configuration
Configuration = user.Configuration,
ConnectLinkType = user.ConnectLinkType,
ConnectUserId = user.ConnectUserId,
ConnectUserName = user.ConnectUserName
};
var image = user.GetImageInfo(ImageType.Primary, 0);