From c238784caa77011ff8ee26b2c28ab3d18d5b3251 Mon Sep 17 00:00:00 2001 From: nilaoda Date: Sat, 20 Aug 2022 14:34:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BC=96=E8=AF=91=E8=AD=A6?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DownloadManager/SimpleDownloadManager.cs | 2 +- src/N_m3u8DL-RE/Entity/Mediainfo.cs | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs b/src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs index 523e560..f65cf52 100644 --- a/src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs +++ b/src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs @@ -68,7 +68,7 @@ namespace N_m3u8DL_RE.DownloadManager Logger.WarnMarkUp($"[darkorange3_1]{ResString.autoBinaryMerge2}[/]"); } - if (mediainfos.Where(m => m.Type == "Audio").All(m => m.BaseInfo.Contains("aac"))) + if (mediainfos.Where(m => m.Type == "Audio").All(m => m.BaseInfo!.Contains("aac"))) { useAACFilter = true; } diff --git a/src/N_m3u8DL-RE/Entity/Mediainfo.cs b/src/N_m3u8DL-RE/Entity/Mediainfo.cs index c3daa6b..ae019b5 100644 --- a/src/N_m3u8DL-RE/Entity/Mediainfo.cs +++ b/src/N_m3u8DL-RE/Entity/Mediainfo.cs @@ -9,19 +9,19 @@ namespace N_m3u8DL_RE.Entity { internal class Mediainfo { - public string Id { get; set; } - public string Text { get; set; } - public string BaseInfo { get; set; } - public string Bitrate { get; set; } - public string Resolution { get; set; } - public string Fps { get; set; } - public string Type { get; set; } + public string? Id { get; set; } + public string? Text { get; set; } + public string? BaseInfo { get; set; } + public string? Bitrate { get; set; } + public string? Resolution { get; set; } + public string? Fps { get; set; } + public string? Type { get; set; } public bool DolbyVison { get; set; } public bool HDR { get; set; } public override string? ToString() { - return $"{(string.IsNullOrEmpty(Id) ? "NaN" : Id)}: " + string.Join(", ", new List { Type, BaseInfo, Resolution, Fps, Bitrate }.Where(i => !string.IsNullOrEmpty(i))); + return $"{(string.IsNullOrEmpty(Id) ? "NaN" : Id)}: " + string.Join(", ", new List { Type, BaseInfo, Resolution, Fps, Bitrate }.Where(i => !string.IsNullOrEmpty(i))); } public string ToStringMarkUp()