优化自定义加密方式的设置逻辑

This commit is contained in:
nilaoda 2022-10-24 20:06:07 +08:00
parent 87ff57ef58
commit a44ade8264
1 changed files with 7 additions and 7 deletions

View File

@ -29,13 +29,6 @@ namespace N_m3u8DL_RE.Parser.Processor.HLS
var encryptInfo = new EncryptInfo(method); var encryptInfo = new EncryptInfo(method);
//处理自定义加密方式
if (parserConfig.CustomMethod != null)
{
encryptInfo.Method = parserConfig.CustomMethod.Value;
Logger.Warn("METHOD changed to {}", method, encryptInfo.Method);
}
//IV //IV
if (!string.IsNullOrEmpty(iv)) if (!string.IsNullOrEmpty(iv))
{ {
@ -95,6 +88,13 @@ namespace N_m3u8DL_RE.Parser.Processor.HLS
encryptInfo.Method = EncryptMethod.UNKNOWN; encryptInfo.Method = EncryptMethod.UNKNOWN;
} }
//处理自定义加密方式
if (parserConfig.CustomMethod != null)
{
encryptInfo.Method = parserConfig.CustomMethod.Value;
Logger.Warn("METHOD changed to {}", method, encryptInfo.Method);
}
return encryptInfo; return encryptInfo;
} }