优化编译警告

This commit is contained in:
nilaoda 2022-08-20 14:34:35 +08:00
parent 16bff5391d
commit c238784caa
2 changed files with 9 additions and 9 deletions

View File

@ -68,7 +68,7 @@ namespace N_m3u8DL_RE.DownloadManager
Logger.WarnMarkUp($"[darkorange3_1]{ResString.autoBinaryMerge2}[/]"); 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; useAACFilter = true;
} }

View File

@ -9,19 +9,19 @@ namespace N_m3u8DL_RE.Entity
{ {
internal class Mediainfo internal class Mediainfo
{ {
public string Id { get; set; } public string? Id { get; set; }
public string Text { get; set; } public string? Text { get; set; }
public string BaseInfo { get; set; } public string? BaseInfo { get; set; }
public string Bitrate { get; set; } public string? Bitrate { get; set; }
public string Resolution { get; set; } public string? Resolution { get; set; }
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 bool HDR { get; set; }
public override string? ToString() public override string? ToString()
{ {
return $"{(string.IsNullOrEmpty(Id) ? "NaN" : Id)}: " + string.Join(", ", new List<string> { Type, BaseInfo, Resolution, Fps, Bitrate }.Where(i => !string.IsNullOrEmpty(i))); return $"{(string.IsNullOrEmpty(Id) ? "NaN" : Id)}: " + string.Join(", ", new List<string?> { Type, BaseInfo, Resolution, Fps, Bitrate }.Where(i => !string.IsNullOrEmpty(i)));
} }
public string ToStringMarkUp() public string ToStringMarkUp()