From 106a38927dfb8138abbd808b96df4ff3e18994e9 Mon Sep 17 00:00:00 2001 From: nilaoda Date: Mon, 29 May 2023 23:42:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E6=A0=BC=E5=BC=8F=E5=8C=96BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BBDown/Program.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/BBDown/Program.cs b/BBDown/Program.cs index 416f02a04..ccc7d83d9 100644 --- a/BBDown/Program.cs +++ b/BBDown/Program.cs @@ -624,12 +624,11 @@ private static async Task DoWorkAsync(MyOption myOption) } if (infoMode) continue; - LogDebug("Format Before: " + savePathFormat); - savePath = FormatSavePath(savePathFormat, title, videoTracks.ElementAtOrDefault(vIndex), audioTracks.ElementAtOrDefault(aIndex), p, pagesCount, tvApi, appApi, intlApi); - LogDebug("Format After: " + savePath); - if (downloadDanmaku) { + LogDebug("Format Before: " + savePathFormat); + savePath = FormatSavePath(savePathFormat, title, videoTracks.ElementAtOrDefault(vIndex), audioTracks.ElementAtOrDefault(aIndex), p, pagesCount, tvApi, appApi, intlApi); + LogDebug("Format After: " + savePath); var danmakuXmlPath = savePath[..savePath.LastIndexOf('.')] + ".xml"; var danmakuAssPath = savePath[..savePath.LastIndexOf('.')] + ".ass"; Log("正在下载弹幕Xml文件"); @@ -684,6 +683,10 @@ private static async Task DoWorkAsync(MyOption myOption) selected = true; } + LogDebug("Format Before: " + savePathFormat); + savePath = FormatSavePath(savePathFormat, title, videoTracks.ElementAtOrDefault(vIndex), audioTracks.ElementAtOrDefault(aIndex), p, pagesCount, tvApi, appApi, intlApi); + LogDebug("Format After: " + savePath); + Log($"已选择的流:"); if (videoTracks.Count > 0) { @@ -737,7 +740,6 @@ private static async Task DoWorkAsync(MyOption myOption) if (videoTracks.Count > 0) { - if (!infoMode && File.Exists(savePath) && new FileInfo(savePath).Length != 0) { Log($"{savePath}已存在, 跳过下载...");