mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 01:24:44 +01:00
connect updates
This commit is contained in:
@@ -718,7 +718,8 @@ namespace MediaBrowser.Model.ApiClient
|
||||
/// <param name="password">The password.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="ArgumentNullException">userId</exception>
|
||||
Task<AuthenticationResult> AuthenticateUserAsync(string username, string password);
|
||||
Task<AuthenticationResult> AuthenticateUserAsync(string username,
|
||||
string password);
|
||||
|
||||
/// <summary>
|
||||
/// Updates the server configuration async.
|
||||
|
||||
@@ -39,6 +39,12 @@ namespace MediaBrowser.Model.ApiClient
|
||||
/// <value>The connect user.</value>
|
||||
ConnectUser ConnectUser { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [save local credentials].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [save local credentials]; otherwise, <c>false</c>.</value>
|
||||
bool SaveLocalCredentials { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the API client.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using MediaBrowser.Model.System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Model.ApiClient
|
||||
@@ -19,5 +20,36 @@ namespace MediaBrowser.Model.ApiClient
|
||||
{
|
||||
WakeOnLanInfos = new List<WakeOnLanInfo>();
|
||||
}
|
||||
|
||||
public void ImportInfo(PublicSystemInfo systemInfo)
|
||||
{
|
||||
Name = systemInfo.ServerName;
|
||||
Id = systemInfo.Id;
|
||||
|
||||
if (!string.IsNullOrEmpty(systemInfo.LocalAddress))
|
||||
{
|
||||
LocalAddress = systemInfo.LocalAddress;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(systemInfo.WanAddress))
|
||||
{
|
||||
RemoteAddress = systemInfo.WanAddress;
|
||||
}
|
||||
|
||||
var fullSystemInfo = systemInfo as SystemInfo;
|
||||
|
||||
if (fullSystemInfo != null)
|
||||
{
|
||||
WakeOnLanInfos = new List<WakeOnLanInfo>();
|
||||
|
||||
if (!string.IsNullOrEmpty(fullSystemInfo.MacAddress))
|
||||
{
|
||||
WakeOnLanInfos.Add(new WakeOnLanInfo
|
||||
{
|
||||
MacAddress = fullSystemInfo.MacAddress
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user