Skip to content

Commit

Permalink
A few fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jg committed May 31, 2017
1 parent 178bbcd commit 0ff18fc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/interactive/handlers/changeSceneProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function changeScene(effect, firebot){
var scenes = firebot.scenes;

// Loop through scenes
for (scene of scenes){
for (scene in scenes){
var sceneData = scenes[scene];
var groups = sceneData.default;

Expand Down
28 changes: 16 additions & 12 deletions lib/interactive/mixer-interactive.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ function mixerConnect(){

mixerClient.on('error', (err) => {
console.log('ERROR:', err);
renderWindow.webContents.send('error', err.message);
if(err.message !== ""){
renderWindow.webContents.send('error', err.message);
}
});

mixerClient.state.on('participantJoin', participant => {
Expand Down Expand Up @@ -294,18 +296,20 @@ function changeGroups(participant, groupid){
// Change Default Scene
// This changes the default scene of a group to something else.
function changeScenes(group, scene){
console.log('Changing '+group+' to '+scene+'.')
if(group == "default"){
mixerClient.updateGroups({
groups: [{groupID: 'default', sceneID: scene}]
})
} else {
var group = mixerClient.state.getGroup(group);
group.sceneID = scene;
if(group !== "None"){
console.log('Changing '+group+' to '+scene+'.')
if(group == "default"){
mixerClient.updateGroups({
groups: [{groupID: 'default', sceneID: scene}]
})
} else {
var group = mixerClient.state.getGroup(group);
group.sceneID = scene;

mixerClient.updateGroups({
groups: [group]
})
mixerClient.updateGroups({
groups: [group]
})
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ function createWindow () {
process.on('uncaughtException', function(error) {
// Handle the error
console.error(error);
// Log Event
renderWindow.webContents.send('error', 'Unhandled error. Double check your board settings.');
});

// When Quittin.
Expand Down

0 comments on commit 0ff18fc

Please sign in to comment.