Skip to content

Commit

Permalink
Merge pull request jishi#30 from matiasgarciaisaia/patch-1
Browse files Browse the repository at this point in the history
Missing braces in condition
  • Loading branch information
jishi committed Nov 16, 2014
2 parents 4afdcfa + d4ee3dd commit f5cf995
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/sonos-http-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,10 @@ function HttpAPI(discovery, settings, presets) {
playlists.forEach(function (item) {
if (item.title.toLowerCase() == decodeURIComponent(options.value).toLowerCase()) {
player.replaceQueueWithPlaylist(item.uri.toLowerCase(), function (success){
if (success)
if (success) {
console.log("replaced queue with playlist "+ item.title + ".");
player.play();
}
});
}
});
Expand Down Expand Up @@ -424,4 +425,4 @@ function HttpAPI(discovery, settings, presets) {
console.log("http server listening on port", port);
}

module.exports = HttpAPI;
module.exports = HttpAPI;

0 comments on commit f5cf995

Please sign in to comment.