修复多次添加参数的bug
This commit is contained in:
parent
03fa68b90b
commit
6c9c3e1c62
|
@ -21,9 +21,12 @@ namespace N_m3u8DL_RE.Parser.Processor
|
||||||
var uriFromConfig = new Uri(paserConfig.Url);
|
var uriFromConfig = new Uri(paserConfig.Url);
|
||||||
var newUri = new Uri(oriUrl);
|
var newUri = new Uri(oriUrl);
|
||||||
var newQuery = (newUri.Query.TrimStart('?') + "&" + uriFromConfig.Query.TrimStart('?')).Trim('&');
|
var newQuery = (newUri.Query.TrimStart('?') + "&" + uriFromConfig.Query.TrimStart('?')).Trim('&');
|
||||||
Logger.Debug("Before: " + oriUrl);
|
if (!oriUrl.Contains(uriFromConfig.Query))
|
||||||
oriUrl = (newUri.GetLeftPart(UriPartial.Path) + "?" + newQuery).TrimEnd('?');
|
{
|
||||||
Logger.Debug("After: " + oriUrl);
|
Logger.Debug("Before: " + oriUrl);
|
||||||
|
oriUrl = (newUri.GetLeftPart(UriPartial.Path) + "?" + newQuery).TrimEnd('?');
|
||||||
|
Logger.Debug("After: " + oriUrl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return oriUrl;
|
return oriUrl;
|
||||||
|
|
Loading…
Reference in New Issue