From 754050a8117af6632991844441240e65b5f8c37d Mon Sep 17 00:00:00 2001 From: Chris Ham Date: Wed, 19 Sep 2018 21:34:07 -0700 Subject: [PATCH] use videotimer for room grind so it can be skipped too --- config.json | 2 +- fgfm.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config.json b/config.json index e2ac3e3..ca57c4c 100755 --- a/config.json +++ b/config.json @@ -63,7 +63,7 @@ "auwChance": 50, "recentlyPlayedMemory": 5, "roomGrindChance": 50, - "roomGrindPlaytime": 3600, + "roomGrindPlaytime": 1800, "defaultSRVolume": 50, "vods": [ { diff --git a/fgfm.js b/fgfm.js index dd58c05..4081769 100755 --- a/fgfm.js +++ b/fgfm.js @@ -216,7 +216,7 @@ const streamInit = (config, obs, twitch) => { obs.setSceneItemProperties({"item": "room-grind", "scene-name": config.defaultSceneName, "visible": true}) .then(res => { obs.setTextGDIPlusProperties({"source": config.currentActivitySceneItemName, "scene-name": config.defaultSceneName, "render": true, "text": "NOW SHOWING: TTAS Room Grind !ttas"}); - setTimeout(() => { + videoTimer = setTimeout(() => { // after timeout, hide room-grind and call nextVideo() obs.setSceneItemProperties({"item": "room-grind", "scene-name": config.defaultSceneName, "visible": false}); nextVideo(); @@ -487,14 +487,14 @@ const streamInit = (config, obs, twitch) => { // START VOTE } else if (commandNoPrefix === 'startvote') { videoVoteJob.reschedule("*/15 * * * *"); - twitch.botChat.say(to, `Voting has been started. Next run: ${videoVoteJob.nextInvocation()}`); + twitch.botChat.say(to, `Video Queue Voting will start in 15 minutes!`); // PAUSE VOTE } else if (commandNoPrefix === 'pausevote') { clearInterval(rtvInterval); videoVoteJob.cancel(); - twitch.botChat.say(to, `Voting has been paused.`); + twitch.botChat.say(to, `Video Queue Voting has been paused.`); } } ////////////////