CC-2729: Items in a playlist delivered from the server via JSON aren't in the proper order
-fixed
This commit is contained in:
parent
fd64c917d5
commit
7cfde811c9
|
@ -326,6 +326,7 @@ class Schedule {
|
|||
." ON st.instance_id = si.id"
|
||||
." LEFT JOIN $CC_CONFIG[showTable] as sh"
|
||||
." ON si.show_id = sh.id"
|
||||
//The next line ensures we only get songs that haven't ended yet
|
||||
." WHERE (st.ends >= TIMESTAMP '$p_currentDateTime')"
|
||||
." AND (st.ends <= TIMESTAMP '$p_toDateTime')"
|
||||
//next line makes sure that we aren't returning items that
|
||||
|
@ -703,6 +704,7 @@ class Schedule {
|
|||
$playlists[$pkey]['end'] = Schedule::AirtimeTimeToPypoTime($dx["end"]);
|
||||
}
|
||||
}
|
||||
ksort($playlists);
|
||||
|
||||
foreach ($playlists as &$playlist)
|
||||
{
|
||||
|
@ -729,6 +731,7 @@ class Schedule {
|
|||
'end' => Schedule::AirtimeTimeToPypoTime($item["ends"])
|
||||
);
|
||||
}
|
||||
ksort($medias);
|
||||
$playlist['medias'] = $medias;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue