Closure-RI commited on
Commit
130165c
·
verified ·
1 Parent(s): 354bffd

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +2 -2
index.js CHANGED
@@ -346,7 +346,7 @@ async function getAudioMP3Url(videoUrl) {
346
  const id_video = await GetId(videoUrl);
347
  const infoVids = await getVideoDetailsWithApi(id_video);
348
 
349
- const video = await fetchCobaltOnly(videoUrl, { downloadMode: "audio", audioBitrate: "128" })
350
  console.log(video)
351
 
352
  // Unduh file audio terlebih dahulu
@@ -419,7 +419,7 @@ async function getAudioMP3Url(videoUrl) {
419
  status: 200,
420
  title: infoVids.title,
421
  result: {
422
- fileName: video.result.filename,
423
  url_path: `https://${process.env.SPACE_HOST}/temp/${path.basename(path_audio)}`,
424
  curl_path: `https://${process.env.SPACE_HOST}/temp/${path.basename(path_audio)}?download=1&filename=${infoVids.title}`,
425
  path: path_audio
 
346
  const id_video = await GetId(videoUrl);
347
  const infoVids = await getVideoDetailsWithApi(id_video);
348
 
349
+ const video = await fetchCobaltOnly(videoUrl, { downloadMode: "audio", audioBitrate: "128", filenameStyle: "pretty", audioFormat: "mp3"})
350
  console.log(video)
351
 
352
  // Unduh file audio terlebih dahulu
 
419
  status: 200,
420
  title: infoVids.title,
421
  result: {
422
+ fileName: video.filename,
423
  url_path: `https://${process.env.SPACE_HOST}/temp/${path.basename(path_audio)}`,
424
  curl_path: `https://${process.env.SPACE_HOST}/temp/${path.basename(path_audio)}?download=1&filename=${infoVids.title}`,
425
  path: path_audio