mirror of
https://github.com/NohamR/N_m3u8DL-RE.git
synced 2025-05-25 06:41:57 +00:00
修复多次添加参数的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 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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user