Fix max stream duration for regular ytp

Signed-off-by: loicbersier <loic.bersier1@gmail.com>
This commit is contained in:
loicbersier 2020-05-24 19:26:07 +02:00
parent 62069e0f60
commit ec7b0d9407

View file

@ -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/',