mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-09 17:28:48 +01:00
consolidate connect calls
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user