From ec7b0d9407b8e25431a5fb94475b95be1be07bc7 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sun, 24 May 2020 19:26:07 +0200 Subject: [PATCH] Fix max stream duration for regular ytp Signed-off-by: loicbersier --- commands/fun/ytp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/fun/ytp.js b/commands/fun/ytp.js index dfb3cf0..e980c62 100644 --- a/commands/fun/ytp.js +++ b/commands/fun/ytp.js @@ -214,7 +214,7 @@ class ytpCommand extends Command { let options = { debug: args.debug, MIN_STREAM_DURATION: args.link ? Math.floor(args.link) : null, - MAX_STREAM_DURATION: args.max ? args.max : Math.floor(args.link * 1.5), + MAX_STREAM_DURATION: args.link && args.max ? args.max : Math.floor((Math.random() * 3) + 1), // Random duration of video clip sources: './asset/ytp/sources/', sounds: './asset/ytp/sounds/', music: './asset/ytp/music/',