Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions PlexCleaner/FfMpegTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,23 +178,30 @@ public VerifyResult VerifyMedia(string fileName)
}
if (verifyResult == VerifyResult.DecodeError)
{
// Log the unique error lines, a silent non-zero exit has none so omit the empty field
// Log the unique error lines, a silent non-zero exit has none so omit the empty field.
// Include the operation and file name to match the tool-failure logging convention
// (see MediaTool.LogFailedResult); VerifyMedia streams stderr so it logs inline rather
// than through that helper.
string error = CleanForLog(string.Join(" | ", classifier.Errors));
if (string.IsNullOrEmpty(error))
{
Log.Error(
"Failed execution of {ToolType} : ExitCode: {ExitCode}",
"Failed execution of {ToolType} : {Operation:l} : ExitCode: {ExitCode} : {FileName}",
GetToolType(),
exitCode
nameof(VerifyMedia),
exitCode,
fileName
);
}
else
{
Log.Error(
"Failed execution of {ToolType} : ExitCode: {ExitCode} : {Error}",
"Failed execution of {ToolType} : {Operation:l} : ExitCode: {ExitCode} : {Error} : {FileName}",
GetToolType(),
nameof(VerifyMedia),
exitCode,
error
error,
fileName
);
}
}
Expand Down