mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 14:03:03 +03:00
reduce work done by system info endpoints
This commit is contained in:
@@ -361,7 +361,7 @@ namespace Emby.Server.Implementations
|
||||
|
||||
protected IAuthService AuthService { get; private set; }
|
||||
|
||||
protected readonly StartupOptions StartupOptions;
|
||||
public StartupOptions StartupOptions { get; private set; }
|
||||
protected readonly string ReleaseAssetFilename;
|
||||
|
||||
internal IPowerManagement PowerManagement { get; private set; }
|
||||
@@ -1950,6 +1950,21 @@ namespace Emby.Server.Implementations
|
||||
};
|
||||
}
|
||||
|
||||
public async Task<PublicSystemInfo> GetPublicSystemInfo(CancellationToken cancellationToken)
|
||||
{
|
||||
var localAddress = await GetLocalApiUrl(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
return new PublicSystemInfo
|
||||
{
|
||||
Version = ApplicationVersion.ToString(),
|
||||
Id = SystemId,
|
||||
OperatingSystem = EnvironmentInfo.OperatingSystem.ToString(),
|
||||
WanAddress = ConnectManager.WanApiAddress,
|
||||
ServerName = FriendlyName,
|
||||
LocalAddress = localAddress
|
||||
};
|
||||
}
|
||||
|
||||
public bool EnableHttps
|
||||
{
|
||||
get
|
||||
|
||||
Reference in New Issue
Block a user