Skip to content

Commit

Permalink
Fix play
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoSobrino authored Oct 5, 2024
1 parent a3bfc3a commit 2c1966a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions plugins/downloader-play.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import axios from 'axios';
import { youtubedl, youtubedlv2 } from '@bochilteam/scraper';
import fs from "fs";
import yts from 'yt-search';
import ytmp33 from '../src/libraries/ytmp33.js';
import ytmp44 from '../src/libraries/ytmp44.js';
//import ytmp33 from '../src/libraries/ytmp33.js';
//import ytmp44 from '../src/libraries/ytmp44.js';
import ytdl from 'ytdl-core';

let limit1 = 100;
Expand Down Expand Up @@ -35,7 +35,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 (['play', 'play3', 'playdoc'].includes(command)) {
try {
/*try {
const { status, resultados, error } = await ytmp33(yt_play[0].url);
if (!status) throw new Error(error);
Expand All @@ -59,7 +59,7 @@ const handler = async (m, { conn, command, args, text, usedPrefix }) => {
return;
}
} catch (error) {
console.log('Fallo el 1: ' + error)
console.log('Fallo el 1: ' + error)*/
try {
const audio = `${global.MyApiRestBaseUrl}/api/v2/ytmp3?url=${yt_play[0].url}&apikey=${global.MyApiRestApikey}`;
const ttl = await yt_play[0].title;
Expand Down Expand Up @@ -105,12 +105,12 @@ const handler = async (m, { conn, command, args, text, usedPrefix }) => {
} catch {
throw tradutor.texto4;
}
}
//}
}
}

if (['play2', 'play4', 'playdoc2'].includes(command)) {
try {
/*try {
const { status, resultados, error } = await ytmp44(yt_play[0].url);
if (!status) throw new Error(error);
Expand All @@ -133,7 +133,7 @@ const handler = async (m, { conn, command, args, text, usedPrefix }) => {
await conn.sendMessage(m.chat, { video: buff_vid, mimetype: 'video/mp4', fileName: ttl2 + `.mp4` }, { quoted: m });
return;
}
} catch (error) {
} catch (error) {*/
try {
const video = `${global.MyApiRestBaseUrl}/api/v2/ytmp4?url=${yt_play[0].url}&apikey=${global.MyApiRestApikey}`;
const ttl2 = await yt_play[0].title;
Expand Down Expand Up @@ -179,7 +179,7 @@ const handler = async (m, { conn, command, args, text, usedPrefix }) => {
} catch {
throw tradutor.texto6;
}
}
// }
}
}
};
Expand Down

0 comments on commit 2c1966a

Please sign in to comment.