优化提示信息

This commit is contained in:
nilaoda 2022-08-15 00:40:13 +08:00
parent df354e4eb8
commit 1a4b4487c6
3 changed files with 4 additions and 2 deletions

View File

@ -40,7 +40,7 @@ namespace N_m3u8DL_RE.DownloadManager
if (!DownloaderConfig.BinaryMerge && mediainfos.Any(m => m.DolbyVison == true)) if (!DownloaderConfig.BinaryMerge && mediainfos.Any(m => m.DolbyVison == true))
{ {
DownloaderConfig.BinaryMerge = true; DownloaderConfig.BinaryMerge = true;
Logger.WarnMarkUp(ResString.autoBinaryMerge2); Logger.WarnMarkUp($"[darkorange3_1]{ResString.autoBinaryMerge2}[/]");
} }
if (mediainfos.All(m => m.Type == "Audio")) if (mediainfos.All(m => m.Type == "Audio"))

View File

@ -17,6 +17,7 @@ namespace N_m3u8DL_RE.Entity
public string Fps { get; set; } public string Fps { get; set; }
public string Type { get; set; } public string Type { get; set; }
public bool DolbyVison { get; set; } public bool DolbyVison { get; set; }
public bool HDR { get; set; }
public override string? ToString() public override string? ToString()
{ {
@ -25,7 +26,7 @@ namespace N_m3u8DL_RE.Entity
public string ToStringMarkUp() public string ToStringMarkUp()
{ {
return "[steelblue]" + ToString().EscapeMarkup() + (DolbyVison ? " [darkorange3_1][[DOVI]][/]" : "") + "[/]"; return "[steelblue]" + ToString().EscapeMarkup() + ((HDR && !DolbyVison) ? " [darkorange3_1][[HDR]][/]" : "") + (DolbyVison ? " [darkorange3_1][[DOVI]][/]" : "") + "[/]";
} }
} }
} }

View File

@ -61,6 +61,7 @@ namespace N_m3u8DL_RE.Util
info.Fps = FpsRegex().Match(info.Text).Value; info.Fps = FpsRegex().Match(info.Text).Value;
info.BaseInfo = BaseInfoRegex().Match(info.Text).Groups[1].Value; info.BaseInfo = BaseInfoRegex().Match(info.Text).Groups[1].Value;
info.BaseInfo = ReplaceRegex().Replace(info.BaseInfo, ""); info.BaseInfo = ReplaceRegex().Replace(info.BaseInfo, "");
info.HDR = info.Text.Contains("/bt2020/");
if (info.BaseInfo.Contains("dvhe") if (info.BaseInfo.Contains("dvhe")
|| info.BaseInfo.Contains("dvh1") || info.BaseInfo.Contains("dvh1")