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,12 +698,15 @@ 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)
{
Logger.WarnMarkUp("[grey]Cleaning files...[/]");
OutputFiles.ForEach(f => File.Delete(f.FilePath));
var tmpDir = DownloaderConfig.MyOptions.TmpDir ?? Environment.CurrentDirectory;
OtherUtil.SafeDeleteDir(tmpDir);
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
{

View File

@ -888,12 +888,15 @@ 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)
{
Logger.WarnMarkUp("[grey]Cleaning files...[/]");
OutputFiles.ForEach(f => File.Delete(f.FilePath));
var tmpDir = DownloaderConfig.MyOptions.TmpDir ?? Environment.CurrentDirectory;
OtherUtil.SafeDeleteDir(tmpDir);
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
{