tiktok: fix picker audio missing extension

This commit is contained in:
Damir Modyarov 2024-05-21 22:48:25 +03:00
parent cb55dcdc14
commit a0fe86bcc0
No known key found for this signature in database

View File

@ -69,19 +69,20 @@ export default function(r, host, userFormat, isAudioOnly, lang, isAudioMuted, di
params = { picker: r.picker }; params = { picker: r.picker };
break; break;
case "tiktok": case "tiktok":
let pickerType = "render"; let audioStreamType = "render";
if (audioFormat === "mp3" || audioFormat === "best") { if (audioFormat === r.bestAudio || audioFormat === "best") {
audioFormat = "mp3"; audioFormat = r.bestAudio;
pickerType = "bridge" audioStreamType = "bridge"
} }
params = { params = {
type: pickerType,
picker: r.picker, picker: r.picker,
u: createStream({ u: createStream({
service: "tiktok", service: "tiktok",
type: pickerType, type: audioStreamType,
u: r.urls, u: r.urls,
filename: r.audioFilename, filename: r.audioFilename,
isAudioOnly: true,
audioFormat,
}), }),
copy: audioFormat === "best" copy: audioFormat === "best"
} }