From 80b6f855783887f2b0cda8b1f363d02b9701b56d Mon Sep 17 00:00:00 2001 From: nilaoda Date: Mon, 19 Sep 2022 00:37:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=95=E5=88=B6=E7=9B=B4=E6=92=AD=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E7=94=A8=E6=88=B7=E9=80=89=E4=BA=86=E5=87=A0=E4=B8=AA?= =?UTF-8?q?=E6=B5=81=E5=B0=B1=E5=B9=B6=E5=8F=91=E5=BD=95=E5=87=A0=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DownloadManager/SimpleLiveRecordManager2.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/N_m3u8DL-RE/DownloadManager/SimpleLiveRecordManager2.cs b/src/N_m3u8DL-RE/DownloadManager/SimpleLiveRecordManager2.cs index 26a44d7..b2acb92 100644 --- a/src/N_m3u8DL-RE/DownloadManager/SimpleLiveRecordManager2.cs +++ b/src/N_m3u8DL-RE/DownloadManager/SimpleLiveRecordManager2.cs @@ -602,8 +602,13 @@ namespace N_m3u8DL_RE.DownloadManager var limit = DownloaderConfig.MyOptions.LiveRecordLimit; if (limit != TimeSpan.MaxValue) Logger.WarnMarkUp($"[darkorange3_1]{ResString.liveLimit}{GlobalUtil.FormatTime((int)limit.Value.TotalSeconds)}[/]"); + //录制直播时,用户选了几个流就并发录几个 + var options = new ParallelOptions() + { + MaxDegreeOfParallelism = SelectedSteams.Count + }; //并发下载 - await Parallel.ForEachAsync(dic, async (kp, _) => + await Parallel.ForEachAsync(dic, options, async (kp, _) => { var task = kp.Value; var list = new BufferBlock>();