This commit is contained in:
parent
9a55781a64
commit
4e6b337d4f
@ -113,17 +113,18 @@ export default async bot => {
|
||||
try {
|
||||
if(mime == 'video/x-matroska') { // mkv failsafe
|
||||
await queue.exec(`ffmpeg -i ./tmp/${uuid}.mkv -codec copy ./tmp/${uuid}.mp4`);
|
||||
await fs.promises.unlink(source);
|
||||
await fs.promises.unlink(source).catch(_=>{});
|
||||
source = source.replace(/\.mkv$/, '.mp4');
|
||||
mime = 'video/mp4';
|
||||
}
|
||||
if(source.match(/\.opus$/)) { // opus failsave
|
||||
if(source.match(/\.opus$/)) { // opus failsafe
|
||||
await queue.exec(`ffmpeg -i ./tmp/${uuid}.opus -codec copy ./tmp/${uuid}.ogg`);
|
||||
await fs.promises.unlink(source);
|
||||
source = source.replace(/\.opus$/, '.ogg');
|
||||
mime = 'audio/ogg';
|
||||
}
|
||||
} catch(err) {
|
||||
await fs.promises.unlink(source).catch(_=>{});
|
||||
if(e.type == 'tg')
|
||||
return await e.editMessageText(msg.result.chat.id, msg.result.message_id, "something went wrong lol");
|
||||
return await e.reply("something went wrong lol");
|
||||
|
Loading…
Reference in New Issue
Block a user