音频类型输出后缀默认为m4a

This commit is contained in:
nilaoda 2022-07-20 00:12:14 +08:00
parent 9fd43f1c4d
commit 9fa3afca78
1 changed files with 4 additions and 1 deletions

View File

@ -74,7 +74,10 @@ namespace N_m3u8DL_RE.DownloadManager
FileDic[streamSpec.Playlist.MediaInit] = result;
task.Increment(1);
//修改输出后缀
output = Path.ChangeExtension(output, ".mp4");
if (streamSpec.MediaType == Common.Enum.MediaType.AUDIO)
output = Path.ChangeExtension(output, ".m4a");
else
output = Path.ChangeExtension(output, ".mp4");
if (result != null && result.Success)
{
var data = File.ReadAllBytes(result.ActualFilePath);