Pushing queue items into UI select element

Hi All,

I’m currently working on a plugin and struggeling adding queue entries to an UI select element. Can’t figure out why this is not working. Perhaps someone can shed some light inot this. Would be appreciated.

testplugin.prototype.getUIConfig = function () {
  var self = this;
  var defer = libQ.defer();

  socket.emit('getQueue', '');

  var lang_code = this.commandRouter.sharedVars.get('language_code');

  return this.commandRouter.i18nJson(__dirname + '/i18n/strings_' + lang_code + '.json',
      __dirname + '/i18n/strings_en.json',
      __dirname + '/UIConfig.json')
      .then(function (uiconf) {
        [...]
        uiconf.sections[0].content[1].value = config.get('startFromStatic');
        uiconf.sections[0].content[2].value.value = config.get('source');
        uiconf.sections[0].content[2].value.label = config.get('source');
        uiconf.sections[0].content[2].options.push({"value":"foo","label":"foo"});
        uiconf.sections[0].content[2].options.push({"value":"bar","label":"bar"});

        socket.once(
          'pushQueue',
          function(queueList) {
            for (var n = 0; n < queueList.length; n++) {
              self.logger.info('FOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO '+queueList[n].name);
              uiconf.sections[0].content[2].options.push({"value":queueList[n].uri,"label":queueList[n].name});
              /** self.configManager.pushUIConfigParam(uiconf, 'sections[0].content[2].options', {
                value: queueList[n].uri,
                label: queueList[n].name
              });**/
            }
          }
        );

        [...]

        return uiconf;
      })
      .fail(function () {
        libQ.reject(new Error());
      });
};
        [...]
        {
          "id": "source",
          "element": "select",
          "value": {
            "value": "None",
            "label": "None"
          },
          "options": [
          ],
          "label": "Start From Static Content",
          "visibleIf": {"field": "startFromStatic", "value": true}
        }
        [...]
    [...]
    "source": {
      "type": "string",
      "value: "None"
    }
    [...]

Queue list items are present and will be logged…

info: CoreCommandRouter::getUIConfigOnPlugin
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: FOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO ROCK ANTENNE Classic Perlen
info: FOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO ROCK ANTENNE
info: FOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO Metallic66.6
info: FOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO Lynyrd Skynyrd - What's your name
info: FOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO Bikers Inner Circle

… but select element still has only values foo and bar.

I’m lost :laughing:

Thanks and greetins from Berlin.

Martin

Any ideas please?