Small update to HDRadio panel.

This commit is contained in:
Marat Fayzullin 2024-07-13 19:36:34 -04:00
parent 4b1efb199b
commit 862bf1e52b
1 changed files with 4 additions and 4 deletions

View File

@ -614,16 +614,16 @@ HdrMetaPanel.prototype.update = function(data) {
// Update program selector
var $select = $('#hdr-program-id');
if (!data.audio_services) {
$select.hide();
$select.html('');
} else {
if (data.audio_services && data.audio_services.length) {
$select.html(data.audio_services.map(function(pgm) {
var selected = data.program == pgm.id? ' selected' : '';
return '<option value="' + pgm.id + '"' + selected + '>P' +
(pgm.id + 1) + ' - ' + pgm.name + '</option>';
}).join());
$select.show();
} else {
$select.html('');
$select.hide();
}
};