case-insensitive commands, ttas vods, start/stop delay support
This commit is contained in:
@@ -1,5 +1,16 @@
|
||||
{
|
||||
"alttp": [
|
||||
{
|
||||
"id": "ttas",
|
||||
"category": "Optimal TTAS",
|
||||
"label": "Any% NMG Optimal Theory TAS [1:20:38.72]",
|
||||
"name": "OTTAS Full",
|
||||
"chatName": "OTTAS Full",
|
||||
"filePath": "Y:\\media\\videos\\ALttP\\my-vids\\ttas\\Risky\\full-risky-raw.mp4",
|
||||
"sceneItem": "16x9ph",
|
||||
"length": 4843,
|
||||
"includeInShuffle": true
|
||||
},
|
||||
{
|
||||
"id": "ot-seg-escape",
|
||||
"category": "Optimal TTAS Segment",
|
||||
@@ -154,6 +165,17 @@
|
||||
"length": 108,
|
||||
"includeInShuffle": true
|
||||
},
|
||||
{
|
||||
"id": "rta-ttas",
|
||||
"category": "Safe TTAS",
|
||||
"label": "Any% NMG Safe/RTA Theory TAS [1:21:26.52]",
|
||||
"name": "STTAS Full",
|
||||
"chatName": "STTAS Full",
|
||||
"filePath": "Y:\\media\\videos\\ALttP\\my-vids\\ttas\\RTA\\full-rta-raw.mp4",
|
||||
"sceneItem": "16x9ph",
|
||||
"length": 4892,
|
||||
"includeInShuffle": true
|
||||
},
|
||||
{
|
||||
"id": "st-seg-escape",
|
||||
"category": "Safe TTAS Segment",
|
||||
@@ -460,7 +482,7 @@
|
||||
"filePath": "Y:\\media\\videos\\ALttP\\my-vids\\personal-bests\\100%-mg-ahp\\2017-12-22-100mg-11912.mp4",
|
||||
"sceneItem": "16x9ph",
|
||||
"length": 4786,
|
||||
"includeInShuffle": false
|
||||
"includeInShuffle": true
|
||||
},
|
||||
{
|
||||
"id": "pb-ab",
|
||||
@@ -471,18 +493,18 @@
|
||||
"filePath": "Y:\\media\\videos\\ALttP\\my-vids\\personal-bests\\all-bosses\\2017-11-20-ab-10923.mp4",
|
||||
"sceneItem": "16x9ph",
|
||||
"length": 4200,
|
||||
"includeInShuffle": false
|
||||
"includeInShuffle": true
|
||||
},
|
||||
{
|
||||
"id": "pb-ad",
|
||||
"category": "Personal Best",
|
||||
"label": "Personal Best: All Dungeons No EG/DW/WW (1:14:59) [2017-11-19]",
|
||||
"label": "Personal Best: All Dungeons No EG/DG/WW (1:14:59) [2017-11-19]",
|
||||
"name": "All Dungeons (PB)",
|
||||
"chatName": "All Dungeons (PB)",
|
||||
"filePath": "Y:\\media\\videos\\ALttP\\my-vids\\personal-bests\\all-dungeons\\2017-11-19-ad-11459.mp4",
|
||||
"sceneItem": "16x9ph",
|
||||
"length": 4555,
|
||||
"includeInShuffle": false
|
||||
"includeInShuffle": true
|
||||
},
|
||||
{
|
||||
"id": "pb-any-nmg",
|
||||
@@ -493,7 +515,7 @@
|
||||
"filePath": "Y:\\media\\videos\\ALttP\\my-vids\\personal-bests\\any%-nmg-nsq\\2018-05-27-nmg-12624.mp4",
|
||||
"sceneItem": "16x9ph",
|
||||
"length": 5190,
|
||||
"includeInShuffle": false
|
||||
"includeInShuffle": true
|
||||
},
|
||||
{
|
||||
"id": "pb-any-no-eg",
|
||||
@@ -526,7 +548,7 @@
|
||||
"filePath": "Y:\\media\\videos\\ALttP\\my-vids\\personal-bests\\mirror-shield\\2017-06-20-mirror-shield-5032.mp4",
|
||||
"sceneItem": "16x9ph",
|
||||
"length": 3068,
|
||||
"includeInShuffle": false
|
||||
"includeInShuffle": true
|
||||
},
|
||||
{
|
||||
"id": "pb-ms-no-eg",
|
||||
@@ -548,7 +570,7 @@
|
||||
"filePath": "Y:\\media\\videos\\ALttP\\my-vids\\personal-bests\\rbo\\2017-12-01-rbo-11813.mp4",
|
||||
"sceneItem": "16x9ph",
|
||||
"length": 4725,
|
||||
"includeInShuffle": false
|
||||
"includeInShuffle": true
|
||||
},
|
||||
{
|
||||
"id": "pb-100-nmg",
|
||||
|
||||
3
fgfm.js
3
fgfm.js
@@ -474,6 +474,9 @@ const streamInit = (config, twitch) => {
|
||||
// Ignore messages without a command
|
||||
if (!key || key.length === 0) return;
|
||||
|
||||
// Case-insensitive
|
||||
key.toLowerCase();
|
||||
|
||||
// Check for aliased commands
|
||||
if (aliases.hasOwnProperty(key)) key = aliases[key];
|
||||
|
||||
|
||||
@@ -22,10 +22,15 @@ function FGFM(config) {
|
||||
// @TODO: Move these defaults to config
|
||||
if (typeof streamStartDelaySeconds === 'undefined') {
|
||||
streamStartDelaySeconds = 1;
|
||||
} else {
|
||||
streamStartDelaySeconds = parseInt(streamStartDelaySeconds);
|
||||
}
|
||||
|
||||
if (typeof showStartDelaySeconds === 'undefined') {
|
||||
showStartDelaySeconds = 300;
|
||||
} else {
|
||||
showStartDelaySeconds = parseInt(showStartDelaySeconds);
|
||||
showStartDelaySeconds += streamStartDelaySeconds;
|
||||
}
|
||||
|
||||
this.state.showStatus = 'STARTING_SOON';
|
||||
@@ -39,10 +44,11 @@ function FGFM(config) {
|
||||
// Restore volume
|
||||
this.obs.setVolume('headphones', 1.0);
|
||||
|
||||
// Start the stream
|
||||
// Start the stream after delay
|
||||
console.log(`The stream will start in ${streamStartDelaySeconds} seconds!`);
|
||||
setTimeout(() => {this.obs.startStream().then(() => {this.emit('STREAM_STARTED')})}, streamStartDelaySeconds*1000);
|
||||
|
||||
// Start the "show" after stream+show delay
|
||||
// @TODO: Actually show the countdown in the scene
|
||||
console.log(`The show will start in ${showStartDelaySeconds} seconds!`);
|
||||
setTimeout(this.startTheShow, showStartDelaySeconds*1000);
|
||||
|
||||
Reference in New Issue
Block a user