01-08-2019, 08:27 AM
Great! This works fine, thnx. Although I had to hardcode the name and card number, otherwise they'll show up empty. For me this is not a problem, since I never change these.
For future reference and others wanting to do something similar, here is the final script:
For future reference and others wanting to do something similar, here is the final script:
Code:
#!/usr/bin/php
<?php
set_include_path('/var/www/inc');
require_once 'playerlib.php';
$_SESSION[cardnum]=0;
$_SESSION['spotifyname']="Librespot blackbox";
sysCmd('killall librespot');
sysCmd('/var/www/vol.sh -restore'); // r44d
// reset to inactive
playerSession('write', 'spotactive', '0');
$GLOBALS['spotactive'] = '0';
sendEngCmd('spotactive0');
startSpotify();
?>