Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/ympd.default
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ MPD_PORT=6600
MPD_PASSWORD=
WEB_PORT=8080
YMPD_USER=nobody
DIRBLE_API_TOKEN=2e223c9909593b94fc6577361a
DIRBLE_API_TOKEN=
2 changes: 1 addition & 1 deletion contrib/ympd.service
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Environment=MPD_PORT=6600
Environment=MPD_PASSWORD=
Environment=WEB_PORT=8080
Environment=YMPD_USER=nobody
Environment=DIRBLE_API_TOKEN=2e223c9909593b94fc6577361a
Environment=DIRBLE_API_TOKEN=
EnvironmentFile=/etc/default/ympd
ExecStart=/usr/bin/ympd --user $YMPD_USER --mpdpass "$MPD_PASSWORD" --webport $WEB_PORT --host $MPD_HOST --port $MPD_PORT --dirbletoken $DIRBLE_API_TOKEN
Type=simple
Expand Down
17 changes: 9 additions & 8 deletions htdocs/js/mpd.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,14 +493,15 @@ function webSocketConnect() {
break;
case 'outputnames':
$('#btn-outputs-block button').remove();
if (obj.data.length > 1) {
$.each(obj.data, function(id, name){
var btn = $('<button id="btnoutput'+id+'" class="btn btn-default" onclick="toggleoutput(this, '+id+')"><span class="glyphicon glyphicon-volume-up"></span> '+name+'</button>');
btn.appendTo($('#btn-outputs-block'));
});
} else {
$('#btn-outputs-block').addClass('hide');
}
var num_outputs = 0;
$.each(obj.data, function(id, name){
var btn = $('<button id="btnoutput' + id +
'" class="btn btn-default" onclick="toggleoutput(this, ' + id + ')">' +
'<span class="glyphicon glyphicon-volume-up"></span> ' + name + '</button>');
btn.appendTo($('#btn-outputs-block'));
num_outputs++;
});
if (num_outputs == 1) { $('#btn-outputs-block').addClass('hide'); }
/* remove cache, since the buttons have been recreated */
last_outputs = '';
break;
Expand Down