Example #1
0
function mpdQueueAddMultiple($sock, $songs)
{
    $commands = array();
    foreach ($songs as $song) {
        array_push($commands, 'add "' . html_entity_decode($song) . '"');
    }
    return chainMpdCommands($sock, $commands);
}
function enqueueAll($sock, $json)
{
    $commands = array();
    foreach ($json as $song) {
        $path = $song["file"];
        array_push($commands, "add \"" . html_entity_decode($path) . "\"");
    }
    chainMpdCommands($sock, $commands);
}