丰富日志输出
This commit is contained in:
parent
43cb264374
commit
ecb01fcca3
|
@ -25,5 +25,26 @@ namespace N_m3u8DL_RE.Entity
|
||||||
public double? PlaylistMaxDur { get; set; }
|
public double? PlaylistMaxDur { get; set; }
|
||||||
|
|
||||||
public string For { get; set; } = "best";
|
public string For { get; set; } = "best";
|
||||||
|
|
||||||
|
public override string? ToString()
|
||||||
|
{
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
|
||||||
|
if (GroupIdReg != null) sb.Append($"GroupIdReg: {GroupIdReg} ");
|
||||||
|
if (LanguageReg != null) sb.Append($"LanguageReg: {LanguageReg} ");
|
||||||
|
if (NameReg != null) sb.Append($"NameReg: {NameReg} ");
|
||||||
|
if (CodecsReg != null) sb.Append($"CodecsReg: {CodecsReg} ");
|
||||||
|
if (ResolutionReg != null) sb.Append($"ResolutionReg: {ResolutionReg} ");
|
||||||
|
if (FrameRateReg != null) sb.Append($"FrameRateReg: {FrameRateReg} ");
|
||||||
|
if (ChannelsReg != null) sb.Append($"ChannelsReg: {ChannelsReg} ");
|
||||||
|
if (VideoRangeReg != null) sb.Append($"VideoRangeReg: {VideoRangeReg} ");
|
||||||
|
if (UrlReg != null) sb.Append($"UrlReg: {UrlReg} ");
|
||||||
|
if (SegmentsMinCount != null) sb.Append($"SegmentsMinCount: {SegmentsMinCount} ");
|
||||||
|
if (SegmentsMaxCount != null) sb.Append($"SegmentsMaxCount: {SegmentsMaxCount} ");
|
||||||
|
if (PlaylistMinDur != null) sb.Append($"PlaylistMinDur: {PlaylistMinDur} ");
|
||||||
|
if (PlaylistMaxDur != null) sb.Append($"PlaylistMaxDur: {PlaylistMaxDur} ");
|
||||||
|
|
||||||
|
return sb.ToString() + $"For: {For}";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,7 @@ namespace N_m3u8DL_RE
|
||||||
throw new FileNotFoundException(ResString.ffmpegNotFound);
|
throw new FileNotFoundException(ResString.ffmpegNotFound);
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.Extra($"ffmpeg: {option.FFmpegBinaryPath}");
|
Logger.Extra($"ffmpeg => {option.FFmpegBinaryPath}");
|
||||||
|
|
||||||
//预先检查mkvmerge
|
//预先检查mkvmerge
|
||||||
if (option.UseMkvmerge && option.MuxAfterDone)
|
if (option.UseMkvmerge && option.MuxAfterDone)
|
||||||
|
@ -116,7 +116,7 @@ namespace N_m3u8DL_RE
|
||||||
{
|
{
|
||||||
throw new FileNotFoundException("mkvmerge not found");
|
throw new FileNotFoundException("mkvmerge not found");
|
||||||
}
|
}
|
||||||
Logger.Extra($"mkvmerge: {option.MkvmergeBinaryPath}");
|
Logger.Extra($"mkvmerge => {option.MkvmergeBinaryPath}");
|
||||||
}
|
}
|
||||||
|
|
||||||
//预先检查
|
//预先检查
|
||||||
|
@ -132,14 +132,14 @@ namespace N_m3u8DL_RE
|
||||||
var file4 = GlobalUtil.FindExecutable("packager-win-x64");
|
var file4 = GlobalUtil.FindExecutable("packager-win-x64");
|
||||||
if (file == null && file2 == null && file3 == null && file4 == null) throw new FileNotFoundException("shaka-packager not found!");
|
if (file == null && file2 == null && file3 == null && file4 == null) throw new FileNotFoundException("shaka-packager not found!");
|
||||||
option.DecryptionBinaryPath = file ?? file2 ?? file3 ?? file4;
|
option.DecryptionBinaryPath = file ?? file2 ?? file3 ?? file4;
|
||||||
Logger.Extra($"shaka-packager: {option.DecryptionBinaryPath}");
|
Logger.Extra($"shaka-packager => {option.DecryptionBinaryPath}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var file = GlobalUtil.FindExecutable("mp4decrypt");
|
var file = GlobalUtil.FindExecutable("mp4decrypt");
|
||||||
if (file == null) throw new FileNotFoundException("mp4decrypt not found!");
|
if (file == null) throw new FileNotFoundException("mp4decrypt not found!");
|
||||||
option.DecryptionBinaryPath = file;
|
option.DecryptionBinaryPath = file;
|
||||||
Logger.Extra($"mp4decrypt: {option.DecryptionBinaryPath}");
|
Logger.Extra($"mp4decrypt => {option.DecryptionBinaryPath}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!File.Exists(option.DecryptionBinaryPath))
|
else if (!File.Exists(option.DecryptionBinaryPath))
|
||||||
|
@ -230,6 +230,13 @@ namespace N_m3u8DL_RE
|
||||||
lists = basicStreams.Concat(audios).Concat(subs).OrderBy(x => true);
|
lists = basicStreams.Concat(audios).Concat(subs).OrderBy(x => true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (option.DropVideoFilter != null) Logger.Extra($"DropVideoFilter => {option.DropVideoFilter}");
|
||||||
|
if (option.DropAudioFilter != null) Logger.Extra($"DropAudioFilter => {option.DropAudioFilter}");
|
||||||
|
if (option.DropSubtitleFilter != null) Logger.Extra($"DropSubtitleFilter => {option.DropSubtitleFilter}");
|
||||||
|
if (option.VideoFilter != null) Logger.Extra($"VideoFilter => {option.VideoFilter}");
|
||||||
|
if (option.AudioFilter != null) Logger.Extra($"AudioFilter => {option.AudioFilter}");
|
||||||
|
if (option.SubtitleFilter != null) Logger.Extra($"SubtitleFilter => {option.SubtitleFilter}");
|
||||||
|
|
||||||
if (option.AutoSelect)
|
if (option.AutoSelect)
|
||||||
{
|
{
|
||||||
if (basicStreams.Any())
|
if (basicStreams.Any())
|
||||||
|
|
Loading…
Reference in New Issue