This commit is contained in:
nilaoda 2023-06-15 17:58:54 +08:00
parent 76a8b50f36
commit c9ced6571c
2 changed files with 16 additions and 10 deletions

View File

@ -698,13 +698,16 @@ namespace N_m3u8DL_RE.DownloadManager
if (DownloaderConfig.MyOptions.UseMkvmerge) result = MergeUtil.MuxInputsByMkvmerge(DownloaderConfig.MyOptions.MkvmergeBinaryPath!, OutputFiles.ToArray(), outPath);
else result = MergeUtil.MuxInputsByFFmpeg(DownloaderConfig.MyOptions.FFmpegBinaryPath!, OutputFiles.ToArray(), outPath, DownloaderConfig.MyOptions.MuxToMp4, !DownloaderConfig.MyOptions.NoDateInfo);
//完成后删除各轨道文件
if (result && !DownloaderConfig.MyOptions.MuxKeepFiles)
if (result)
{
if (!DownloaderConfig.MyOptions.MuxKeepFiles)
{
Logger.WarnMarkUp("[grey]Cleaning files...[/]");
OutputFiles.ForEach(f => File.Delete(f.FilePath));
var tmpDir = DownloaderConfig.MyOptions.TmpDir ?? Environment.CurrentDirectory;
OtherUtil.SafeDeleteDir(tmpDir);
}
}
else
{
success = false;

View File

@ -888,13 +888,16 @@ namespace N_m3u8DL_RE.DownloadManager
if (DownloaderConfig.MyOptions.UseMkvmerge) result = MergeUtil.MuxInputsByMkvmerge(DownloaderConfig.MyOptions.MkvmergeBinaryPath!, OutputFiles.ToArray(), outPath);
else result = MergeUtil.MuxInputsByFFmpeg(DownloaderConfig.MyOptions.FFmpegBinaryPath!, OutputFiles.ToArray(), outPath, DownloaderConfig.MyOptions.MuxToMp4, !DownloaderConfig.MyOptions.NoDateInfo);
//完成后删除各轨道文件
if (result && !DownloaderConfig.MyOptions.MuxKeepFiles)
if (result)
{
if (!DownloaderConfig.MyOptions.MuxKeepFiles)
{
Logger.WarnMarkUp("[grey]Cleaning files...[/]");
OutputFiles.ForEach(f => File.Delete(f.FilePath));
var tmpDir = DownloaderConfig.MyOptions.TmpDir ?? Environment.CurrentDirectory;
OtherUtil.SafeDeleteDir(tmpDir);
}
}
else
{
success = false;