From 9ab8f3cf72ebd75a840013a6509869943f356a4a Mon Sep 17 00:00:00 2001 From: nilaoda Date: Fri, 28 Jul 2023 23:08:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=B9=BF=E5=91=8A=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E6=95=88=E6=9E=9C=20#237?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs | 2 +- src/N_m3u8DL-RE/Util/FilterUtil.cs | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs b/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs index 9f9ad4a..a035ef0 100644 --- a/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs +++ b/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs @@ -18,7 +18,7 @@ namespace N_m3u8DL_RE.CommandLine { internal partial class CommandInvoker { - public const string VERSION_INFO = "N_m3u8DL-RE (Beta version) 20230721"; + public const string VERSION_INFO = "N_m3u8DL-RE (Beta version) 20230728"; [GeneratedRegex("((best|worst)\\d*|all)")] private static partial Regex ForStrRegex(); diff --git a/src/N_m3u8DL-RE/Util/FilterUtil.cs b/src/N_m3u8DL-RE/Util/FilterUtil.cs index 0f57a53..e71b36c 100644 --- a/src/N_m3u8DL-RE/Util/FilterUtil.cs +++ b/src/N_m3u8DL-RE/Util/FilterUtil.cs @@ -246,6 +246,9 @@ namespace N_m3u8DL_RE.Util foreach (var stream in selectedSteams) { if (stream.Playlist == null) continue; + + var countBefore = stream.SegmentsCount; + foreach (var part in stream.Playlist.MediaParts) { //没有找到广告分片 @@ -262,6 +265,13 @@ namespace N_m3u8DL_RE.Util //清理已经为空的 part stream.Playlist.MediaParts = stream.Playlist.MediaParts.Where(x => x.MediaSegments.Count > 0).ToList(); + + var countAfter = stream.SegmentsCount; + + if (countBefore != countAfter) + { + Logger.WarnMarkUp("[grey]{} segments => {} segments[/]", countBefore, countAfter); + } } } }