-all songs of the current show are now highlighted in the now playing datatable.
This commit is contained in:
parent
dc6fcec0e3
commit
eeaa7da6f5
5 changed files with 30 additions and 18 deletions
|
@ -18,23 +18,30 @@ class Application_Model_Nowplaying
|
|||
array("sTitle"=>"Artist"),
|
||||
array("sTitle"=>"Album"),
|
||||
array("sTitle"=>"Creator"),
|
||||
array("sTitle"=>"Playlist"));
|
||||
array("sTitle"=>"Playlist"),
|
||||
array("sTitle"=>"bgcolor", "bVisible"=>false),
|
||||
array("sTitle"=>"group_id", "bVisible"=>false));
|
||||
$rows = array();
|
||||
|
||||
$current_group_id = -1;
|
||||
if (count($current) != 0){
|
||||
$current_group_id = $current[0]["group_id"];
|
||||
}
|
||||
|
||||
foreach ($previous as $item){
|
||||
array_push($rows, array("p", $item["starts"], $item["starts"], $item["ends"], $item["clip_length"], $item["track_title"], $item["artist_name"],
|
||||
$item["album_title"], "x" , $item["name"]));
|
||||
$item["album_title"], "x" , $item["name"], ($item["group_id"] == $current_group_id ? $item["background_color"] : ""), $item["group_id"]));
|
||||
}
|
||||
|
||||
|
||||
foreach ($current as $item){
|
||||
array_push($rows, array("c", $item["starts"], $item["starts"], $item["ends"], $item["clip_length"], $item["track_title"], $item["artist_name"],
|
||||
$item["album_title"], "x" , $item["name"]));
|
||||
$item["album_title"], "x" , $item["name"], $item["background_color"], $item["group_id"]));
|
||||
}
|
||||
|
||||
foreach ($next as $item){
|
||||
array_push($rows, array("n", $item["starts"], $item["starts"], $item["ends"], $item["clip_length"], $item["track_title"], $item["artist_name"],
|
||||
$item["album_title"], "x" , $item["name"]));
|
||||
$item["album_title"], "x" , $item["name"], ($item["group_id"] == $current_group_id ? $item["background_color"] : ""), $item["group_id"]));
|
||||
}
|
||||
|
||||
return array("columnHeaders"=>$columnHeaders, "rows"=>$rows);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue