Question to command.Router command

Hi to the devs,

i try to modify a plugin (autostart) and have following questions:
Following commands are working:
self.commandRouter.volumioPlay(lastPosition);
self.commandRouter.volumioPlay();

Following commands are not working:
self.commandRouter.volumioSeek(seek);
As values (for seek) i tried seconds and miliseconds. I also tried the values as string, unfortunatelly this doesnt work.
As workaround i got following code working:
self.executeCommand('seek ' + seek);
with corresponding function

autostart.prototype.executeCommand = function (cmd)
{
  var self = this;
  var defer = libQ.defer();
  var command = '/usr/local/bin/volumio ' + cmd;
  
  exec(command, {uid:1000, gid:1000}, function (error, stout, stderr) {   
    if(error)
      self.logger.error(stderr);
    defer.resolve();
  });
  return defer.promise;
};

What I want to achieve: Because my volumio is mobile, I would like to

  • continue playing the song in the queue after shutdown and restart at the same place
  • not just the first song in the queue, but the right song in the queue
  • and not the song from the beginning, but from the position where it was at the shutdown.

Maybe someone has helpful tips.

Regards

AxLED

Hi,

after some debugging i found out, that self.commandRouter.volumioSeek(seek);
works, but volumio has to be started all the way until all services are up.

AxLED