<?php

require '../header.php';

$queues = Queue::getList();

$data = array();
foreach ( $queues as $queue ) {
   $newdata = array();
   $newdata['id'] = $queue->getID();
   $count = $queue->getSongCount();
   $newdata['name'] = $queue->getName() . (($count == 0) ? " **" : "");
   $newdata['type'] = $queue->getType();
   $newdata['active'] = $queue->getActive();
   $data['queues'][] = $newdata;
}
$data['queuetarget'] = $_SESSION['queuetarget'];

header('Content-Type: application/json');
echo json_encode($data);
exit();

// vim: et ts=3 sw=3 ai:
