Browse Source

feat: show next and ffmpeg version in troubleshooting (#2958)

pull/2959/head
Jason Dove 6 days ago committed by GitHub
parent
commit
9cc771beb8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      CHANGELOG.md
  2. 2
      ErsatzTV.Application/Troubleshooting/Queries/GetTroubleshootingInfo.cs
  3. 7
      ErsatzTV.Application/Troubleshooting/Queries/GetTroubleshootingInfoHandler.cs
  4. 2
      ErsatzTV.Application/Troubleshooting/TroubleshootingInfo.cs
  5. 2
      ErsatzTV/Controllers/Api/TroubleshootController.cs
  6. 6
      ErsatzTV/Pages/Troubleshooting/Troubleshooting.razor

3
CHANGELOG.md

@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased] ## [Unreleased]
### Added
- Show Legacy, Next and FFmpeg versions in **Troubleshooting** > **General**
### Changed ### Changed
- Upgrade all bundled versions of ffmpeg from 7.1 to 8.1.2 - Upgrade all bundled versions of ffmpeg from 7.1 to 8.1.2
- Other versions (`linux64` and `linuxarm64`) are available at https://github.com/ErsatzTV/ErsatzTV-ffmpeg/releases/tag/8.1.2 - Other versions (`linux64` and `linuxarm64`) are available at https://github.com/ErsatzTV/ErsatzTV-ffmpeg/releases/tag/8.1.2

2
ErsatzTV.Application/Troubleshooting/Queries/GetTroubleshootingInfo.cs

@ -1,3 +1,3 @@
namespace ErsatzTV.Application.Troubleshooting.Queries; namespace ErsatzTV.Application.Troubleshooting.Queries;
public record GetTroubleshootingInfo : IRequest<TroubleshootingInfo>; public record GetTroubleshootingInfo(string NextVersion) : IRequest<TroubleshootingInfo>;

7
ErsatzTV.Application/Troubleshooting/Queries/GetTroubleshootingInfoHandler.cs

@ -51,6 +51,8 @@ public class GetTroubleshootingInfoHandler : IRequestHandler<GetTroubleshootingI
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()? .GetCustomAttribute<AssemblyInformationalVersionAttribute>()?
.InformationalVersion ?? "unknown"; .InformationalVersion ?? "unknown";
string ffmpegVersion = "unknown";
var healthCheckSummaries = healthCheckResults var healthCheckSummaries = healthCheckResults
.Filter(r => r.Status is HealthCheckStatus.Warning or HealthCheckStatus.Fail) .Filter(r => r.Status is HealthCheckStatus.Warning or HealthCheckStatus.Fail)
.Map(r => new HealthCheckResultSummary(r.Title, r.Message)) .Map(r => new HealthCheckResultSummary(r.Title, r.Message))
@ -90,6 +92,9 @@ public class GetTroubleshootingInfoHandler : IRequestHandler<GetTroubleshootingI
{ {
foreach (ConfigElement ffmpegPath in maybeFFmpegPath) foreach (ConfigElement ffmpegPath in maybeFFmpegPath)
{ {
ffmpegVersion =
await _hardwareCapabilitiesFactory.GetFFmpegVersion(ffmpegPath.Value, cancellationToken);
nvidiaCapabilities = await _hardwareCapabilitiesFactory.GetNvidiaOutput(ffmpegPath.Value); nvidiaCapabilities = await _hardwareCapabilitiesFactory.GetNvidiaOutput(ffmpegPath.Value);
if (!_memoryCache.TryGetValue("ffmpeg.render_devices", out List<string> vaapiDevices)) if (!_memoryCache.TryGetValue("ffmpeg.render_devices", out List<string> vaapiDevices))
@ -189,6 +194,8 @@ public class GetTroubleshootingInfoHandler : IRequestHandler<GetTroubleshootingI
return new TroubleshootingInfo( return new TroubleshootingInfo(
version, version,
request.NextVersion,
ffmpegVersion,
environment, environment,
cpuList, cpuList,
videoControllerList, videoControllerList,

2
ErsatzTV.Application/Troubleshooting/TroubleshootingInfo.cs

@ -6,6 +6,8 @@ namespace ErsatzTV.Application.Troubleshooting;
public record TroubleshootingInfo( public record TroubleshootingInfo(
string Version, string Version,
string NextVersion,
string FFmpegVersion,
Dictionary<string, string> Environment, Dictionary<string, string> Environment,
List<CpuModel> Cpus, List<CpuModel> Cpus,
List<VideoControllerModel> VideoControllers, List<VideoControllerModel> VideoControllers,

2
ErsatzTV/Controllers/Api/TroubleshootController.cs

@ -85,7 +85,7 @@ public class TroubleshootController(
try try
{ {
TroubleshootingInfo troubleshootingInfo = await mediator.Send( TroubleshootingInfo troubleshootingInfo = await mediator.Send(
new GetTroubleshootingInfo(), new GetTroubleshootingInfo(NextVersion.Version),
cancellationToken); cancellationToken);
// filter ffmpeg profiles // filter ffmpeg profiles

6
ErsatzTV/Pages/Troubleshooting/Troubleshooting.razor

@ -149,12 +149,14 @@
try try
{ {
TroubleshootingInfo info = await Mediator.Send(new GetTroubleshootingInfo(), token); TroubleshootingInfo info = await Mediator.Send(new GetTroubleshootingInfo(NextVersion.Version), token);
_troubleshootingInfo = JsonSerializer.Serialize( _troubleshootingInfo = JsonSerializer.Serialize(
new new
{ {
info.Version, LegacyVersion = info.Version,
info.NextVersion,
info.FFmpegVersion,
Environment = info.Environment.OrderBy(x => x.Key).ToDictionary(x => x.Key, x => x.Value), Environment = info.Environment.OrderBy(x => x.Key).ToDictionary(x => x.Key, x => x.Value),
info.Cpus, info.Cpus,
info.VideoControllers, info.VideoControllers,

Loading…
Cancel
Save