remove the check for temp.mp4 as it was not the issue

This commit is contained in:
loicbersier 2019-10-30 18:08:10 +01:00
parent 3c9d1be819
commit afa3e56703

View file

@ -99,11 +99,11 @@ class ytpCommand extends Command {
mp4.push(file); mp4.push(file);
} }
}); });
// Select random vid depending on the ammount of MAX_CLIPS // Select random vid depending on the amount of MAX_CLIPS
for (let i = 0; i < MAX_CLIPS; i++) { for (let i = 0; i < MAX_CLIPS; i++) {
let random = Math.floor(Math.random() * files.length); let random = Math.floor(Math.random() * files.length);
let vid = `./asset/ytp/userVid/${files[random]}`; let vid = `./asset/ytp/userVid/${files[random]}`;
if (files[random].endsWith('mp4') && !files[random].endsWith('temp.mp4')) { if (files[random].endsWith('mp4')) {
if (!asset.includes(vid)) { if (!asset.includes(vid)) {
asset.push(vid); asset.push(vid);
} }