From 2aa029a35be997d2ee47c970bf635c1df3efdb75 Mon Sep 17 00:00:00 2001 From: nilaoda Date: Wed, 12 Apr 2023 14:43:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96(=3F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/N_m3u8DL-RE/DownloadManager/SimpleLiveRecordManager2.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/N_m3u8DL-RE/DownloadManager/SimpleLiveRecordManager2.cs b/src/N_m3u8DL-RE/DownloadManager/SimpleLiveRecordManager2.cs index 16f4ef2..73f55fd 100644 --- a/src/N_m3u8DL-RE/DownloadManager/SimpleLiveRecordManager2.cs +++ b/src/N_m3u8DL-RE/DownloadManager/SimpleLiveRecordManager2.cs @@ -573,7 +573,10 @@ namespace N_m3u8DL_RE.DownloadManager { inputStream.CopyTo(fileOutputStream); } - if (!DownloaderConfig.MyOptions.LiveKeepSegments && !Path.GetFileName(inputFilePath).StartsWith("_init")) + } + if (!DownloaderConfig.MyOptions.LiveKeepSegments) + { + foreach (var inputFilePath in files.Where(x => !Path.GetFileName(x).StartsWith("_init"))) { File.Delete(inputFilePath); }