From 80c7c9602e96bba7a60a0680e8cf458d82d4dc63 Mon Sep 17 00:00:00 2001 From: Chris Ham Date: Fri, 21 Sep 2018 22:18:45 -0700 Subject: [PATCH] config for commercial enable/disable --- config.json | 3 ++- fgfm.TODO | 5 ++++- fgfm.js | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/config.json b/config.json index 4d5653a..5d65212 100755 --- a/config.json +++ b/config.json @@ -64,7 +64,8 @@ "recentlyPlayedMemory": 5, "roomGrindChance": 25, "roomGrindPlaytime": 1800, - "defaultSRVolume": 50, + "defaultSRVolume": 75, + "commercialsEnabled": false, "vods": [ { "id": "ot-seg-escape", diff --git a/fgfm.TODO b/fgfm.TODO index 568ebde..0fc8af3 100755 --- a/fgfm.TODO +++ b/fgfm.TODO @@ -1,6 +1,6 @@ TODO: ☐ Room vid requests / import - ☐ Add random chance for room grind playlist to show for certain amount of time + ✔ Add random chance for room grind playlist to show for certain amount of time @done (18-09-21 12:28) ☐ modularize OBS and Twitch code ☐ Rotating background images (leftside) ☐ Stream alerts for chat @@ -12,6 +12,9 @@ TODO: ☐ Move vods to their own config ☐ Tool to output list of video ID's / descriptions ☐ Support viewer skip voting + ☐ Command to add sets of videos to the queue at once (like the entire ttas or all gold segments) + ☐ Command to stop video rotation / timers (shutdown) + ☐ Ability to include/exclude vods from shuffle in config ___________________ Archive: diff --git a/fgfm.js b/fgfm.js index 68974c3..0280cb1 100755 --- a/fgfm.js +++ b/fgfm.js @@ -154,7 +154,7 @@ const streamInit = (config, obs, twitch) => { const nextVideo = () => { // Show a "commercial break" if it's been long enough since the last one let secondsSinceLastCommercial = (Date.now() - lastCommercialShownAt) / 1000; - if (secondsSinceLastCommercial >= config.commercialInterval) { + if (config.commercialsEnabled === true && secondsSinceLastCommercial >= config.commercialInterval) { commercialPlaying = true; console.log(`It has been ${secondsSinceLastCommercial} seconds since the last commercial break!`);