use videotimer for room grind so it can be skipped too

This commit is contained in:
Chris Ham
2018-09-19 21:34:07 -07:00
parent aad4326e52
commit 754050a811
2 changed files with 4 additions and 4 deletions

View File

@@ -63,7 +63,7 @@
"auwChance": 50, "auwChance": 50,
"recentlyPlayedMemory": 5, "recentlyPlayedMemory": 5,
"roomGrindChance": 50, "roomGrindChance": 50,
"roomGrindPlaytime": 3600, "roomGrindPlaytime": 1800,
"defaultSRVolume": 50, "defaultSRVolume": 50,
"vods": [ "vods": [
{ {

View File

@@ -216,7 +216,7 @@ const streamInit = (config, obs, twitch) => {
obs.setSceneItemProperties({"item": "room-grind", "scene-name": config.defaultSceneName, "visible": true}) obs.setSceneItemProperties({"item": "room-grind", "scene-name": config.defaultSceneName, "visible": true})
.then(res => { .then(res => {
obs.setTextGDIPlusProperties({"source": config.currentActivitySceneItemName, "scene-name": config.defaultSceneName, "render": true, "text": "NOW SHOWING: TTAS Room Grind !ttas"}); 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() // after timeout, hide room-grind and call nextVideo()
obs.setSceneItemProperties({"item": "room-grind", "scene-name": config.defaultSceneName, "visible": false}); obs.setSceneItemProperties({"item": "room-grind", "scene-name": config.defaultSceneName, "visible": false});
nextVideo(); nextVideo();
@@ -487,14 +487,14 @@ const streamInit = (config, obs, twitch) => {
// START VOTE // START VOTE
} else if (commandNoPrefix === 'startvote') { } else if (commandNoPrefix === 'startvote') {
videoVoteJob.reschedule("*/15 * * * *"); 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 // PAUSE VOTE
} else if (commandNoPrefix === 'pausevote') { } else if (commandNoPrefix === 'pausevote') {
clearInterval(rtvInterval); clearInterval(rtvInterval);
videoVoteJob.cancel(); videoVoteJob.cancel();
twitch.botChat.say(to, `Voting has been paused.`); twitch.botChat.say(to, `Video Queue Voting has been paused.`);
} }
} }
//////////////// ////////////////