From b483f1457a29d5945829bf3a770f831a1dd267a2 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Mon, 28 Oct 2019 15:10:21 +0100 Subject: [PATCH] make sure it use .mp4 and not temp file --- commands/fun/ytp.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/fun/ytp.js b/commands/fun/ytp.js index f196306..830a04f 100644 --- a/commands/fun/ytp.js +++ b/commands/fun/ytp.js @@ -103,7 +103,7 @@ class ytpCommand extends Command { for (let i = 0; i < MAX_CLIPS; i++) { let random = Math.floor(Math.random() * files.length); let vid = `./asset/ytp/userVid/${files[random]}`; - if (files[random].endsWith('mp4')) { + if (files[random].endsWith('mp4') && !files[random].endsWith('temp.mp4')) { if (!asset.includes(vid)) { asset.push(vid); } @@ -114,7 +114,7 @@ class ytpCommand extends Command { let options = { - debug: false, // Better set this to false to avoid flood in console + debug: true, // Better set this to false to avoid flood in console MIN_STREAM_DURATION: Math.floor((Math.random() * 3) + 1), // Random duration of video clip sources: './asset/ytp/sources/', sounds: './asset/ytp/sounds/',