diff --git a/AudioNodes/AudioBooks/CreateAudioBook.cs b/AudioNodes/AudioBooks/CreateAudioBook.cs index 6da70969..a51b95b1 100644 --- a/AudioNodes/AudioBooks/CreateAudioBook.cs +++ b/AudioNodes/AudioBooks/CreateAudioBook.cs @@ -58,10 +58,17 @@ public class CreateAudioBook: AudioNode { var ffmpeg = GetFFmpeg(args); if (string.IsNullOrEmpty(ffmpeg)) + { + args.FailureReason = "FFmpeg not found"; return -1; + } + var ffprobe = GetFFprobe(args); if (string.IsNullOrEmpty(ffprobe)) + { + args.FailureReason = "FFprobe not found"; return -1; + } var dir = args.IsDirectory ? args.WorkingFile : FileHelper.GetDirectory(args.WorkingFile); @@ -202,6 +209,7 @@ public class CreateAudioBook: AudioNode if (System.IO.File.Exists(outputFile) == false || new System.IO.FileInfo(outputFile).Length == 0) { + args.FailureReason = "Failed to create output file: " + outputFile; args.Logger.ELog("Failed to create output file: " + outputFile); return -1; } @@ -226,6 +234,7 @@ public class CreateAudioBook: AudioNode var dest = args.ReplaceVariables(DestinationPath, stripMissing: true); if (args.FileService.FileMove(outputFile, dest).Failed(out string error)) { + args.FailureReason = "Failed to save to destination: " + error; args.Logger?.ELog("Failed to save to destination: " + error); return -1; } diff --git a/AudioNodes/InputNodes/AudioFile.cs b/AudioNodes/InputNodes/AudioFile.cs index dadf4d9e..d3ebdfdc 100644 --- a/AudioNodes/InputNodes/AudioFile.cs +++ b/AudioNodes/InputNodes/AudioFile.cs @@ -41,12 +41,19 @@ namespace FileFlows.AudioNodes { string ffmpegExe = GetFFmpeg(args); if (string.IsNullOrEmpty(ffmpegExe)) + { + args.FailureReason = "FFmpeg not found"; return -1; + } + string ffprobe = GetFFprobe(args); if (string.IsNullOrEmpty(ffprobe)) + { + args.FailureReason = "FFprobe not found"; return -1; + } + - if (args.FileService.FileCreationTimeUtc(args.WorkingFile).Success(out DateTime createTime)) args.Variables["ORIGINAL_CREATE_UTC"] = createTime; if (args.FileService.FileLastWriteTimeUtc(args.WorkingFile).Success(out DateTime writeTime)) @@ -68,6 +75,7 @@ namespace FileFlows.AudioNodes catch (Exception ex) { args.Logger.ELog("Failed processing AudioFile: " + ex.Message); + args.FailureReason = "Failed processing AudioFile: " + ex.Message; return -1; } } diff --git a/BasicNodes/BasicNodes.en.json b/BasicNodes/BasicNodes.en.json index 1a6acc49..c2d13376 100644 --- a/BasicNodes/BasicNodes.en.json +++ b/BasicNodes/BasicNodes.en.json @@ -252,7 +252,7 @@ "Description": "Chooses a random output", "Fields": { "Outputs": "Outputs", - "Outputs-Help": "The number of outputs available to this flow element." + "Outputs-Help": "The number of outputs that could possible be called." } }, "ReplaceOriginal": { diff --git a/VideoNodes/FfmpegBuilderNodes/Audio/FfmpegBuilderAudioAddTrack.cs b/VideoNodes/FfmpegBuilderNodes/Audio/FfmpegBuilderAudioAddTrack.cs index 7da8a9b9..772746f8 100644 --- a/VideoNodes/FfmpegBuilderNodes/Audio/FfmpegBuilderAudioAddTrack.cs +++ b/VideoNodes/FfmpegBuilderNodes/Audio/FfmpegBuilderAudioAddTrack.cs @@ -189,7 +189,8 @@ public class FfmpegBuilderAudioAddTrack : FfmpegBuilderNode var bestAudio = GetBestAudioTrack(args, Model.AudioStreams.Select(x => x.Stream)); if (bestAudio == null) { - args.Logger.WLog("No source audio track found"); + args.Logger.ELog("No source audio track found"); + args.FailureReason = "No source audio track found"; return -1; }