优化DEBUG异常输出

This commit is contained in:
nilaoda 2022-11-13 02:08:16 +08:00
parent c9cc8223d0
commit fd2fbe791e
2 changed files with 6 additions and 1 deletions

View File

@ -35,6 +35,10 @@ namespace N_m3u8DL_RE.Common.Util
{ {
return JsonSerializer.Serialize(sList, Context.ListStreamSpec); return JsonSerializer.Serialize(sList, Context.ListStreamSpec);
} }
else if (o is IEnumerable<MediaSegment> mList)
{
return JsonSerializer.Serialize(mList, Context.IEnumerableMediaSegment);
}
return "{NOT SUPPORTED}"; return "{NOT SUPPORTED}";
} }

View File

@ -9,6 +9,7 @@ using Spectre.Console;
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
@ -116,7 +117,7 @@ namespace N_m3u8DL_RE.Downloader
catch (Exception ex) catch (Exception ex)
{ {
Logger.WarnMarkUp($"[grey]{ex.Message.EscapeMarkup()} retryCount: {retryCount}[/]"); Logger.WarnMarkUp($"[grey]{ex.Message.EscapeMarkup()} retryCount: {retryCount}[/]");
Logger.Debug(ex.ToString()); Logger.Debug(url + " " + ex.ToString());
if (retryCount-- > 0) if (retryCount-- > 0)
{ {
await Task.Delay(1000); await Task.Delay(1000);