From 9d249a7d9a6bac556014842c9d6e4cbb5edbda34 Mon Sep 17 00:00:00 2001 From: nilaoda Date: Mon, 24 Oct 2022 10:27:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=88=E6=9C=AC=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs | 7 ++++--- src/N_m3u8DL-RE/Program.cs | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs b/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs index e4794c0..8372be3 100644 --- a/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs +++ b/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs @@ -17,6 +17,8 @@ namespace N_m3u8DL_RE.CommandLine { internal partial class CommandInvoker { + public const string VERSION_INFO = "N_m3u8DL-RE (Beta version) 20221024"; + [GeneratedRegex("((best|worst)\\d*|all)")] private static partial Regex ForStrRegex(); @@ -433,8 +435,7 @@ namespace N_m3u8DL_RE.CommandLine Environment.Exit(0); } - var info = "N_m3u8DL-RE (Beta version) 20221023"; - var rootCommand = new RootCommand(info) + var rootCommand = new RootCommand(VERSION_INFO) { Input, TmpDir, SaveDir, SaveName, BaseUrl, ThreadCount, DownloadRetryCount, AutoSelect, SkipMerge, SkipDownload, CheckSegmentsCount, BinaryMerge, DelAfterDone, WriteMetaJson, AppendUrlParams, ConcurrentDownload, Headers, /**SavePattern,**/ SubOnly, SubtitleFormat, AutoSubtitleFix, @@ -445,7 +446,7 @@ namespace N_m3u8DL_RE.CommandLine LivePerformAsVod, LiveRealTimeMerge, LiveKeepSegments, LiveRecordLimit, LiveWaitTime, MuxImports, VideoFilter, AudioFilter, SubtitleFilter, MoreHelp }; - Logger.Info(info); + rootCommand.TreatUnmatchedTokensAsErrors = true; rootCommand.SetHandler(async (myOption) => await action(myOption), new MyOptionBinder()); diff --git a/src/N_m3u8DL-RE/Program.cs b/src/N_m3u8DL-RE/Program.cs index 2ddd54d..0cb4994 100644 --- a/src/N_m3u8DL-RE/Program.cs +++ b/src/N_m3u8DL-RE/Program.cs @@ -56,6 +56,7 @@ namespace N_m3u8DL_RE static async Task DoWorkAsync(MyOption option) { + Logger.Info(CommandInvoker.VERSION_INFO); Logger.LogLevel = option.LogLevel; if (option.UseSystemProxy == false)