diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-12-01 12:03:40 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-12-01 12:03:40 -0500 |
| commit | d7a1a87009eed638d28d070e6a47c8a5bee38c2e (patch) | |
| tree | 9b5a83bcc6e41d893bb252c2595662bfdd1cbb80 /Emby.Server.Implementations/ApplicationHost.cs | |
| parent | 5ca1b96c6f9afd8b6fc5e05abd984f5b78ec5696 (diff) | |
reduce work done by system info endpoints
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 9a159194e..abc6c3566 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -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 |
