From 27cfee5f018fcc09b73de1bf6cf74f25e58cd9c3 Mon Sep 17 00:00:00 2001 From: nilaoda Date: Sat, 21 Oct 2023 23:18:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BD=93=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BB=A5`\r`=E6=8D=A2=E8=A1=8C=E6=97=B6=E7=9A=84=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Processor/HLS/DefaultHLSContentProcessor.cs | 6 ++++++ src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/N_m3u8DL-RE.Parser/Processor/HLS/DefaultHLSContentProcessor.cs b/src/N_m3u8DL-RE.Parser/Processor/HLS/DefaultHLSContentProcessor.cs index 47535f4..3e69ee0 100644 --- a/src/N_m3u8DL-RE.Parser/Processor/HLS/DefaultHLSContentProcessor.cs +++ b/src/N_m3u8DL-RE.Parser/Processor/HLS/DefaultHLSContentProcessor.cs @@ -29,6 +29,12 @@ namespace N_m3u8DL_RE.Parser.Processor.HLS public override string Process(string m3u8Content, ParserConfig parserConfig) { + //处理content以\r作为换行符的情况 + if (m3u8Content.Contains("\r") && !m3u8Content.Contains("\n")) + { + m3u8Content = m3u8Content.Replace("\r", Environment.NewLine); + } + var m3u8Url = parserConfig.Url; //央视频回放 if (m3u8Url.Contains("tlivecloud-playback-cdn.ysp.cctv.cn") && m3u8Url.Contains("endtime=")) diff --git a/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs b/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs index 3a59b52..a6219d4 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) 20231015"; + public const string VERSION_INFO = "N_m3u8DL-RE (Beta version) 20231021"; [GeneratedRegex("((best|worst)\\d*|all)")] private static partial Regex ForStrRegex();