diff --git a/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs b/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs index 0d4c26dc..68a541b1 100644 --- a/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs +++ b/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs @@ -18,7 +18,7 @@ namespace N_m3u8DL_RE.CommandLine { internal partial class CommandInvoker { - public const string VERSION_INFO = "N_m3u8DL-RE (Beta version) 20230615"; + public const string VERSION_INFO = "N_m3u8DL-RE (Beta version) 20230617"; [GeneratedRegex("((best|worst)\\d*|all)")] private static partial Regex ForStrRegex(); diff --git a/src/N_m3u8DL-RE/Program.cs b/src/N_m3u8DL-RE/Program.cs index 5e8e7986..967ed0de 100644 --- a/src/N_m3u8DL-RE/Program.cs +++ b/src/N_m3u8DL-RE/Program.cs @@ -207,6 +207,12 @@ static async Task DoWorkAsync(MyOption option) //可选字幕轨道 var subs = lists.Where(x => x.MediaType == MediaType.SUBTITLES); + //尝试从URL或文件读取文件名 + if (string.IsNullOrEmpty(option.SaveName)) + { + option.SaveName = OtherUtil.GetFileNameFromInput(option.Input); + } + //生成文件夹 var tmpDir = Path.Combine(option.TmpDir ?? Environment.CurrentDirectory, $"{option.SaveName ?? DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}"); //记录文件 @@ -310,11 +316,6 @@ static async Task DoWorkAsync(MyOption option) Console.ReadKey(); #endif - //尝试从URL或文件读取文件名 - if (string.IsNullOrEmpty(option.SaveName)) - { - option.SaveName = OtherUtil.GetFileNameFromInput(option.Input); - } Logger.InfoMarkUp(ResString.saveName + $"[deepskyblue1]{option.SaveName.EscapeMarkup()}[/]");