diff --git a/src/N_m3u8DL-RE.Common/Resource/ResString.cs b/src/N_m3u8DL-RE.Common/Resource/ResString.cs index a880a41..22487db 100644 --- a/src/N_m3u8DL-RE.Common/Resource/ResString.cs +++ b/src/N_m3u8DL-RE.Common/Resource/ResString.cs @@ -13,6 +13,7 @@ namespace N_m3u8DL_RE.Common.Resource public static string autoBinaryMerge2 { get => GetText("autoBinaryMerge2"); } public static string autoBinaryMerge3 { get => GetText("autoBinaryMerge3"); } public static string autoBinaryMerge4 { get => GetText("autoBinaryMerge4"); } + public static string autoBinaryMerge5 { get => GetText("autoBinaryMerge5"); } public static string badM3u8 { get => GetText("badM3u8"); } public static string binaryMerge { get => GetText("binaryMerge"); } public static string checkingLast { get => GetText("checkingLast"); } diff --git a/src/N_m3u8DL-RE.Common/Resource/StaticText.cs b/src/N_m3u8DL-RE.Common/Resource/StaticText.cs index 2d296fb..b787c5a 100644 --- a/src/N_m3u8DL-RE.Common/Resource/StaticText.cs +++ b/src/N_m3u8DL-RE.Common/Resource/StaticText.cs @@ -34,6 +34,12 @@ namespace N_m3u8DL_RE.Common.Resource zhTW: "檢測到CENC加密方式,自動開啟二進位制合併", enUS: "When CENC encryption is detected, binary merging is automatically enabled" ), + ["autoBinaryMerge5"] = new TextContainer + ( + zhCN: "检测到杜比视界内容,混流功能已禁用", + zhTW: "檢測到杜比視界內容,混流功能已禁用", + enUS: "Dolby Vision content is detected, mux after done is automatically disabled" + ), ["badM3u8"] = new TextContainer ( zhCN: "错误的m3u8", @@ -216,9 +222,9 @@ namespace N_m3u8DL_RE.Common.Resource ), ["cmd_uiLanguage"] = new TextContainer ( - zhCN: "设置UI语言 (zh-CN, zh-TW, en-US)", - zhTW: "設置UI語言 (zh-CN, zh-TW, en-US)", - enUS: "Set UI language (zh-CN, zh-TW, en-US)" + zhCN: "设置UI语言", + zhTW: "設置UI語言", + enUS: "Set UI language" ), ["cmd_urlProcessorArgs"] = new TextContainer ( diff --git a/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs b/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs index bb17800..546c4f4 100644 --- a/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs +++ b/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs @@ -15,7 +15,7 @@ namespace N_m3u8DL_RE.CommandLine private readonly static Option SaveDir = new(new string[] { "--save-dir" }, description: ResString.cmd_saveDir); private readonly static Option SaveName = new(new string[] { "--save-name" }, description: ResString.cmd_saveName); private readonly static Option SavePattern = new(new string[] { "--save-pattern" }, description: ResString.cmd_savePattern, getDefaultValue: () => "____"); - private readonly static Option UILanguage = new(new string[] { "--ui-language" }, description: ResString.cmd_uiLanguage); + private readonly static Option UILanguage = new Option(new string[] { "--ui-language" }, description: ResString.cmd_uiLanguage).FromAmong("en-US", "zh-CN", "zh-TW"); private readonly static Option UrlProcessorArgs = new(new string[] { "--urlprocessor-args" }, description: ResString.cmd_urlProcessorArgs); private readonly static Option Keys = new(new string[] { "--key" }, description: ResString.cmd_keys) { Arity = ArgumentArity.ZeroOrMore, AllowMultipleArgumentsPerToken = false }; private readonly static Option KeyTextFile = new(new string[] { "--key-text-file" }, description: ResString.cmd_keyText); @@ -32,7 +32,7 @@ namespace N_m3u8DL_RE.CommandLine private readonly static Option DelAfterDone = new(new string[] { "--del-after-done" }, description: ResString.cmd_delAfterDone, getDefaultValue: () => true); private readonly static Option AutoSubtitleFix = new(new string[] { "--auto-subtitle-fix" }, description: ResString.cmd_subtitleFix, getDefaultValue: () => true); private readonly static Option CheckSegmentsCount = new(new string[] { "--check-segments-count" }, description: ResString.cmd_checkSegmentsCount, getDefaultValue: () => true); - private readonly static Option WriteMetaJson = new(new string[] { "--write-meta-json" }, description: ResString.cmd_writeMetaJson, getDefaultValue: () => true); + private readonly static Option WriteMetaJson = new(new string[] { "--write-meta-json" }, description: ResString.cmd_writeMetaJson, getDefaultValue: () => false); private readonly static Option AppendUrlParams = new(new string[] { "--append-url-params" }, description: ResString.cmd_appendUrlParams, getDefaultValue: () => false); private readonly static Option MP4RealTimeDecryption = new (new string[] { "--mp4-real-time-decryption" }, description: ResString.cmd_MP4RealTimeDecryption, getDefaultValue: () => false); private readonly static Option UseShakaPackager = new (new string[] { "--use-shaka-packager" }, description: ResString.cmd_useShakaPackager, getDefaultValue: () => false); @@ -86,7 +86,7 @@ namespace N_m3u8DL_RE.CommandLine //以用户选择语言为准优先 - if (option.UILanguage != null && new List { "en-US", "zh-CN", "zh-TW" }.Contains(option.UILanguage)) + if (option.UILanguage != null) { CultureInfo.DefaultThreadCurrentCulture = new CultureInfo(option.UILanguage); Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(option.UILanguage); diff --git a/src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs b/src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs index 0b9ea2d..b8e6697 100644 --- a/src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs +++ b/src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs @@ -87,6 +87,12 @@ namespace N_m3u8DL_RE.DownloadManager Logger.WarnMarkUp($"[darkorange3_1]{ResString.autoBinaryMerge2}[/]"); } + if (!DownloaderConfig.MuxAfterDone && mediainfos.Any(m => m.DolbyVison == true)) + { + DownloaderConfig.MuxAfterDone = false; + Logger.WarnMarkUp($"[darkorange3_1]{ResString.autoBinaryMerge5}[/]"); + } + if (mediainfos.Where(m => m.Type == "Audio").All(m => m.BaseInfo!.Contains("aac"))) { useAACFilter = true; diff --git a/src/N_m3u8DL-RE/N_m3u8DL-RE.csproj b/src/N_m3u8DL-RE/N_m3u8DL-RE.csproj index c7fe853..c1398a6 100644 --- a/src/N_m3u8DL-RE/N_m3u8DL-RE.csproj +++ b/src/N_m3u8DL-RE/N_m3u8DL-RE.csproj @@ -7,7 +7,7 @@ enable preview enable - 0.0.1 + 0.0.2