Skip to content

Commit

Permalink
Update descargas-play.js
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoSobrino authored May 17, 2024
1 parent c443e50 commit e50c2b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/descargas-play.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const handler = async (m, {conn, command, args, text, usedPrefix}) => {
conn.sendMessage(m.chat, {image: {url: yt_play[0].thumbnail}, caption: texto1}, {quoted: m});
if (command == 'play') {
try {
const audio = global.API('CFROSAPI', `/api/v1/ytmp3?url=${yt_play[0].url}`)
const audio = `${global.MyApiRestBaseUrl}/api/v1/ytmp3?url=${yt_play[0].url}&apikey=${global.MyApiRestApikey}`;
const ttl = await yt_play[0].title
const buff_aud = await getBuffer(audio);
const fileSizeInBytes = buff_aud.byteLength;
Expand All @@ -48,7 +48,7 @@ const handler = async (m, {conn, command, args, text, usedPrefix}) => {
}}
if (command == 'play2') {
try {
const video = global.API('CFROSAPI', `/api/v1/ytmp4?url=${yt_play[0].url}`)
const video = `${global.MyApiRestBaseUrl}/api/v1/ytmp4?url=${yt_play[0].url}&apikey=${global.MyApiRestApikey}`;
const ttl2 = await yt_play[0].title
const buff_vid = await getBuffer(video);
const fileSizeInBytes2 = buff_vid.byteLength;
Expand Down

0 comments on commit e50c2b3

Please sign in to comment.