diff --git a/.gitignore b/.gitignore index d2c2d964..1fc43a97 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ obj/ # Ignore Mac DS_Store files .DS_Store +npm-debug.log diff --git a/lib/actions/equalizer.js b/lib/actions/equalizer.js index ca1157d7..1897a738 100644 --- a/lib/actions/equalizer.js +++ b/lib/actions/equalizer.js @@ -10,7 +10,16 @@ function speechEnhancement(player, values) { return player.speechEnhancement(enable); } +function balance(player, values) { + + const balance = parseInt(values[0]); + + return player.setBalance(balance); + +} + module.exports = function (api) { api.registerAction('nightmode', nightMode); api.registerAction('speechenhancement', speechEnhancement); + api.registerAction('balance', balance); } diff --git a/lib/actions/volume.js b/lib/actions/volume.js index 31fe8eb2..0bddbf2b 100644 --- a/lib/actions/volume.js +++ b/lib/actions/volume.js @@ -1,7 +1,8 @@ 'use strict'; function volume(player, values) { var volume = values[0]; - return player.setVolume(volume); + var channel = values[1] || 'Master'; + return player.setVolume(volume, channel); } function groupVolume(player, values) {