优化默认format解析

This commit is contained in:
nilaoda 2022-08-27 00:04:11 +08:00
parent 8ac945fe29
commit ed4f1b196e
1 changed files with 1 additions and 1 deletions

View File

@ -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";