Skip to content

Commit

Permalink
OKEGui/OKEGui/Task/AddTaskService.cs: check for incorrectly specified…
Browse files Browse the repository at this point in the history
… OutputCodec

the field name is case sensitive (for the yaml deserializer).

Updates #10.

Signed-off-by: akarin <[email protected]>
  • Loading branch information
AkarinVS committed Mar 31, 2022
1 parent 58316b8 commit 81bf9d5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions OKEGui/OKEGui/Task/AddTaskService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,14 @@ public static TaskProfile ProcessJsonProfile(TaskProfile json, DirectoryInfo pro

if (json.AudioTracks != null && json.AudioTracks.Count > 0)
{
foreach (AudioInfo ai in json.AudioTracks)
{
if (string.IsNullOrWhiteSpace(ai.OutputCodec))
{
MessageBox.Show("音轨未设置 OutputCodec,请检查大小写", "音轨编码错误", MessageBoxButton.OK, MessageBoxImage.Error);
return null;
}
}
// 主音轨
json.AudioFormat = json.AudioTracks[0].OutputCodec;
if (string.IsNullOrEmpty(json.AudioFormat))
Expand Down

0 comments on commit 81bf9d5

Please sign in to comment.