04-04-2024, 11:33 AM
There is no alternative in r839 because the command was inadvertently left out when REST was refactored.
You can edit the file /var/www/command/index.php and add the case 'restart_renderer' code block. Then use http://moode/command/?cmd=restart_renderer --spotify
You can edit the file /var/www/command/index.php and add the case 'restart_renderer' code block. Then use http://moode/command/?cmd=restart_renderer --spotify
Code:
case 'libupd-submit.php': // DEPRECATED: not used via http
$result = sysCmd('/var/www/util/libupd-submit.php');
echo 'Library update submitted';
break;
case 'restart_renderer': // --bluetooth | --airplay | --spotify | --squeezelite | --roonbridge
$result = sysCmd('/var/www/util/restart-renderer.php ' . getArgs($cmd));
echo (empty($result) ? 'OK' : 'Missing or invalid argument');
break;
default: // MPD commands
if (false === ($sock = openMpdSock('localhost', 6600))) {
debugLog('command/index.php: Connection to MPD failed');
} else {
sendMpdCmd($sock, $_GET['cmd']);
$resp = readMpdResp($sock);
closeMpdSock($sock);
echo json_encode(parseMpdRespAsJSON($resp), JSON_FORCE_OBJECT);
}