From fd2fbe791e5f243f547002d47e376fcf038acea4 Mon Sep 17 00:00:00 2001 From: nilaoda Date: Sun, 13 Nov 2022 02:08:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96DEBUG=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/N_m3u8DL-RE.Common/Util/GlobalUtil.cs | 4 ++++ src/N_m3u8DL-RE/Downloader/SimpleDownloader.cs | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/N_m3u8DL-RE.Common/Util/GlobalUtil.cs b/src/N_m3u8DL-RE.Common/Util/GlobalUtil.cs index 7e50188..e535f53 100644 --- a/src/N_m3u8DL-RE.Common/Util/GlobalUtil.cs +++ b/src/N_m3u8DL-RE.Common/Util/GlobalUtil.cs @@ -35,6 +35,10 @@ namespace N_m3u8DL_RE.Common.Util { return JsonSerializer.Serialize(sList, Context.ListStreamSpec); } + else if (o is IEnumerable mList) + { + return JsonSerializer.Serialize(mList, Context.IEnumerableMediaSegment); + } return "{NOT SUPPORTED}"; } diff --git a/src/N_m3u8DL-RE/Downloader/SimpleDownloader.cs b/src/N_m3u8DL-RE/Downloader/SimpleDownloader.cs index 1225b25..32daac4 100644 --- a/src/N_m3u8DL-RE/Downloader/SimpleDownloader.cs +++ b/src/N_m3u8DL-RE/Downloader/SimpleDownloader.cs @@ -9,6 +9,7 @@ using Spectre.Console; using System; using System.Collections.Concurrent; using System.Collections.Generic; +using System.Data; using System.Diagnostics; using System.Linq; using System.Text; @@ -116,7 +117,7 @@ namespace N_m3u8DL_RE.Downloader catch (Exception ex) { Logger.WarnMarkUp($"[grey]{ex.Message.EscapeMarkup()} retryCount: {retryCount}[/]"); - Logger.Debug(ex.ToString()); + Logger.Debug(url + " " + ex.ToString()); if (retryCount-- > 0) { await Task.Delay(1000);