From 6c9c3e1c62c0dd5bceefe0dd4e8169abab5dc430 Mon Sep 17 00:00:00 2001 From: nilaoda Date: Fri, 11 Nov 2022 01:04:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=9A=E6=AC=A1=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8F=82=E6=95=B0=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/N_m3u8DL-RE.Parser/Processor/DefaultUrlProcessor.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/N_m3u8DL-RE.Parser/Processor/DefaultUrlProcessor.cs b/src/N_m3u8DL-RE.Parser/Processor/DefaultUrlProcessor.cs index 018a7ff..32a27bd 100644 --- a/src/N_m3u8DL-RE.Parser/Processor/DefaultUrlProcessor.cs +++ b/src/N_m3u8DL-RE.Parser/Processor/DefaultUrlProcessor.cs @@ -21,9 +21,12 @@ namespace N_m3u8DL_RE.Parser.Processor var uriFromConfig = new Uri(paserConfig.Url); var newUri = new Uri(oriUrl); var newQuery = (newUri.Query.TrimStart('?') + "&" + uriFromConfig.Query.TrimStart('?')).Trim('&'); - Logger.Debug("Before: " + oriUrl); - oriUrl = (newUri.GetLeftPart(UriPartial.Path) + "?" + newQuery).TrimEnd('?'); - Logger.Debug("After: " + oriUrl); + if (!oriUrl.Contains(uriFromConfig.Query)) + { + Logger.Debug("Before: " + oriUrl); + oriUrl = (newUri.GetLeftPart(UriPartial.Path) + "?" + newQuery).TrimEnd('?'); + Logger.Debug("After: " + oriUrl); + } } return oriUrl;