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. @@ -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/).
## [Unreleased]
### Added
- Show Legacy, Next and FFmpeg versions in **Troubleshooting** > **General**
### Changed
- 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

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

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

2
ErsatzTV.Application/Troubleshooting/TroubleshootingInfo.cs

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

2
ErsatzTV/Controllers/Api/TroubleshootController.cs

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

6
ErsatzTV/Pages/Troubleshooting/Troubleshooting.razor

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

Loading…
Cancel
Save