Skip to content

Commit a3bfc3a

Browse files
authored
Fix play
1 parent 04dd752 commit a3bfc3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

β€Žplugins/downloader-play.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const handler = async (m, { conn, command, args, text, usedPrefix }) => {
6161
} catch (error) {
6262
console.log('Fallo el 1: ' + error)
6363
try {
64-
const audio = `${global.MyApiRestBaseUrl}/api/v1/ytmp3?url=${yt_play[0].url}&apikey=${global.MyApiRestApikey}`;
64+
const audio = `${global.MyApiRestBaseUrl}/api/v2/ytmp3?url=${yt_play[0].url}&apikey=${global.MyApiRestApikey}`;
6565
const ttl = await yt_play[0].title;
6666
const buff_aud = await getBuffer(audio);
6767
const fileSizeInBytes = buff_aud.byteLength;
@@ -135,7 +135,7 @@ const handler = async (m, { conn, command, args, text, usedPrefix }) => {
135135
}
136136
} catch (error) {
137137
try {
138-
const video = `${global.MyApiRestBaseUrl}/api/v1/ytmp4?url=${yt_play[0].url}&apikey=${global.MyApiRestApikey}`;
138+
const video = `${global.MyApiRestBaseUrl}/api/v2/ytmp4?url=${yt_play[0].url}&apikey=${global.MyApiRestApikey}`;
139139
const ttl2 = await yt_play[0].title;
140140
const buff_vid = await getBuffer(video);
141141
const fileSizeInBytes2 = buff_vid.byteLength;

0 commit comments

Comments
Β (0)