Browse Source

fix: use case-insensitive lookup for mpeg-ts script

pull/2916/head
Jason Dove 2 months ago
parent
commit
01a1860df2
No known key found for this signature in database
  1. 2
      ErsatzTV.Application/FFmpegProfiles/Queries/GetFFmpegSettingsHandler.cs
  2. 2
      ErsatzTV.Application/Troubleshooting/Queries/GetTroubleshootingInfoHandler.cs
  3. 4
      ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs

2
ErsatzTV.Application/FFmpegProfiles/Queries/GetFFmpegSettingsHandler.cs

@ -72,7 +72,7 @@ public class GetFFmpegSettingsHandler(IConfigElementRepository configElementRepo
WorkAheadSegmenterLimit = await workAheadSegmenterLimit.IfNoneAsync(1), WorkAheadSegmenterLimit = await workAheadSegmenterLimit.IfNoneAsync(1),
InitialSegmentCount = await initialSegmentCount.IfNoneAsync(1), InitialSegmentCount = await initialSegmentCount.IfNoneAsync(1),
HlsDirectOutputFormat = await outputFormatKind.IfNoneAsync(OutputFormatKind.MpegTs), HlsDirectOutputFormat = await outputFormatKind.IfNoneAsync(OutputFormatKind.MpegTs),
DefaultMpegTsScript = await defaultMpegTsScript.IfNoneAsync("Default"), DefaultMpegTsScript = await defaultMpegTsScript.IfNoneAsync("default"),
}; };
foreach (int watermarkId in watermark) foreach (int watermarkId in watermark)

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

@ -264,7 +264,7 @@ public class GetTroubleshootingInfoHandler : IRequestHandler<GetTroubleshootingI
WorkAheadSegmenterLimit = await workAheadSegmenterLimit.IfNoneAsync(1), WorkAheadSegmenterLimit = await workAheadSegmenterLimit.IfNoneAsync(1),
InitialSegmentCount = await initialSegmentCount.IfNoneAsync(1), InitialSegmentCount = await initialSegmentCount.IfNoneAsync(1),
HlsDirectOutputFormat = await outputFormatKind.IfNoneAsync(OutputFormatKind.MpegTs), HlsDirectOutputFormat = await outputFormatKind.IfNoneAsync(OutputFormatKind.MpegTs),
DefaultMpegTsScript = await defaultMpegTsScript.IfNoneAsync("Default") DefaultMpegTsScript = await defaultMpegTsScript.IfNoneAsync("default")
}; };
foreach (int watermarkId in watermark) foreach (int watermarkId in watermark)

4
ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs

@ -1038,9 +1038,9 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
// TODO: save reports? // TODO: save reports?
string defaultScript = await _configElementRepository string defaultScript = await _configElementRepository
.GetValue<string>(ConfigElementKey.FFmpegDefaultMpegTsScript, cancellationToken) .GetValue<string>(ConfigElementKey.FFmpegDefaultMpegTsScript, cancellationToken)
.IfNoneAsync("Default"); .IfNoneAsync("default");
List<MpegTsScript> allScripts = _mpegTsScriptService.GetScripts(); List<MpegTsScript> allScripts = _mpegTsScriptService.GetScripts();
Option<MpegTsScript> maybeScript = Optional(allScripts.Find(s => s.Id == defaultScript)); Option<MpegTsScript> maybeScript = Optional(allScripts.Find(s => string.Equals(s.Id, defaultScript, StringComparison.OrdinalIgnoreCase)));
foreach (var script in maybeScript) foreach (var script in maybeScript)
{ {
Option<Command> maybeCommand = await _mpegTsScriptService.Execute( Option<Command> maybeCommand = await _mpegTsScriptService.Execute(

Loading…
Cancel
Save