优化默认format解析
This commit is contained in:
parent
8ac945fe29
commit
ed4f1b196e
|
@ -102,7 +102,7 @@ namespace N_m3u8DL_RE.CommandLine
|
||||||
var v = result.Tokens.First().Value;
|
var v = result.Tokens.First().Value;
|
||||||
var p = new ComplexParamParser(v);
|
var p = new ComplexParamParser(v);
|
||||||
//混流格式
|
//混流格式
|
||||||
var format = p.GetValue("format") ?? v; //若未获取到,直接整个字符串作为format解析
|
var format = p.GetValue("format") ?? v.Split(':')[0]; //若未获取到,直接:前的字符串作为format解析
|
||||||
if (format != "mp4" && format != "mkv")
|
if (format != "mp4" && format != "mkv")
|
||||||
{
|
{
|
||||||
result.ErrorMessage = $"format={format} not valid";
|
result.ErrorMessage = $"format={format} not valid";
|
||||||
|
|
Loading…
Reference in New Issue