From 1a4b4487c61ea7a0554656ba732929dec15a5bf6 Mon Sep 17 00:00:00 2001 From: nilaoda Date: Mon, 15 Aug 2022 00:40:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=90=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs | 2 +- src/N_m3u8DL-RE/Entity/Mediainfo.cs | 3 ++- src/N_m3u8DL-RE/Util/MediainfoUtil.cs | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs b/src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs index dc77935..ab69db4 100644 --- a/src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs +++ b/src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs @@ -40,7 +40,7 @@ namespace N_m3u8DL_RE.DownloadManager if (!DownloaderConfig.BinaryMerge && mediainfos.Any(m => m.DolbyVison == true)) { DownloaderConfig.BinaryMerge = true; - Logger.WarnMarkUp(ResString.autoBinaryMerge2); + Logger.WarnMarkUp($"[darkorange3_1]{ResString.autoBinaryMerge2}[/]"); } if (mediainfos.All(m => m.Type == "Audio")) diff --git a/src/N_m3u8DL-RE/Entity/Mediainfo.cs b/src/N_m3u8DL-RE/Entity/Mediainfo.cs index 6cf34c9..c3daa6b 100644 --- a/src/N_m3u8DL-RE/Entity/Mediainfo.cs +++ b/src/N_m3u8DL-RE/Entity/Mediainfo.cs @@ -17,6 +17,7 @@ namespace N_m3u8DL_RE.Entity public string Fps { get; set; } public string Type { get; set; } public bool DolbyVison { get; set; } + public bool HDR { get; set; } public override string? ToString() { @@ -25,7 +26,7 @@ namespace N_m3u8DL_RE.Entity public string ToStringMarkUp() { - return "[steelblue]" + ToString().EscapeMarkup() + (DolbyVison ? " [darkorange3_1][[DOVI]][/]" : "") + "[/]"; + return "[steelblue]" + ToString().EscapeMarkup() + ((HDR && !DolbyVison) ? " [darkorange3_1][[HDR]][/]" : "") + (DolbyVison ? " [darkorange3_1][[DOVI]][/]" : "") + "[/]"; } } } diff --git a/src/N_m3u8DL-RE/Util/MediainfoUtil.cs b/src/N_m3u8DL-RE/Util/MediainfoUtil.cs index 62c27fc..36d5f7c 100644 --- a/src/N_m3u8DL-RE/Util/MediainfoUtil.cs +++ b/src/N_m3u8DL-RE/Util/MediainfoUtil.cs @@ -61,6 +61,7 @@ namespace N_m3u8DL_RE.Util info.Fps = FpsRegex().Match(info.Text).Value; info.BaseInfo = BaseInfoRegex().Match(info.Text).Groups[1].Value; info.BaseInfo = ReplaceRegex().Replace(info.BaseInfo, ""); + info.HDR = info.Text.Contains("/bt2020/"); if (info.BaseInfo.Contains("dvhe") || info.BaseInfo.Contains("dvh1")