diff --git a/CHANGELOG.md b/CHANGELOG.md index 74a41e2f..dca50448 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Quotes are *always* required when using this feature - e.g. `smart_collection:"one" NOT smart_collection:"two"` - Cycles will be detected and logged, and searches with cycles will not work as expected +- Add all `ETV_*` environment variables to Troubleshooting > General info ### Changed - Start to make UI minimally responsive (functional on smaller screens) diff --git a/ErsatzTV.Application/Troubleshooting/Queries/GetTroubleshootingInfoHandler.cs b/ErsatzTV.Application/Troubleshooting/Queries/GetTroubleshootingInfoHandler.cs index b8623125..adb78308 100644 --- a/ErsatzTV.Application/Troubleshooting/Queries/GetTroubleshootingInfoHandler.cs +++ b/ErsatzTV.Application/Troubleshooting/Queries/GetTroubleshootingInfoHandler.cs @@ -1,3 +1,4 @@ +using System.Collections; using System.Collections.Immutable; using System.Reflection; using System.Runtime.InteropServices; @@ -133,8 +134,18 @@ public class GetTroubleshootingInfoHandler : IRequestHandler(); + foreach (DictionaryEntry de in Environment.GetEnvironmentVariables()) + { + if (de is { Key: string key, Value: string value } && key.StartsWith("ETV_", StringComparison.OrdinalIgnoreCase)) + { + environment[key] = value; + } + } + return new TroubleshootingInfo( version, + environment, healthCheckSummaries, ffmpegSettings, activeFFmpegProfiles, diff --git a/ErsatzTV.Application/Troubleshooting/TroubleshootingInfo.cs b/ErsatzTV.Application/Troubleshooting/TroubleshootingInfo.cs index 15d87b62..fded1b26 100644 --- a/ErsatzTV.Application/Troubleshooting/TroubleshootingInfo.cs +++ b/ErsatzTV.Application/Troubleshooting/TroubleshootingInfo.cs @@ -5,6 +5,7 @@ namespace ErsatzTV.Application.Troubleshooting; public record TroubleshootingInfo( string Version, + Dictionary Environment, IEnumerable Health, FFmpegSettingsViewModel FFmpegSettings, IEnumerable FFmpegProfiles, diff --git a/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj b/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj index 0c550001..32f18b0c 100644 --- a/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj +++ b/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj @@ -35,8 +35,8 @@ - - + + diff --git a/ErsatzTV/Pages/Troubleshooting.razor b/ErsatzTV/Pages/Troubleshooting.razor index 895fb150..f7fa7848 100644 --- a/ErsatzTV/Pages/Troubleshooting.razor +++ b/ErsatzTV/Pages/Troubleshooting.razor @@ -76,7 +76,15 @@ TroubleshootingInfo info = await Mediator.Send(new GetTroubleshootingInfo(), _cts.Token); _troubleshootingInfo = JsonSerializer.Serialize( - new { info.Version, info.Health, info.FFmpegSettings, info.Channels, info.FFmpegProfiles }, + new + { + info.Version, + Environment = info.Environment.OrderBy(x => x.Key).ToDictionary(x => x.Key, x => x.Value), + info.Health, + info.FFmpegSettings, + info.Channels, + info.FFmpegProfiles + }, new JsonSerializerOptions { Converters = { new JsonStringEnumConverter() },