CC-4900: Indicate in the library if a webstream is scheduled in the future or belongs to a playlist
-done
This commit is contained in:
parent
4f5d7869d8
commit
cf2ed25bfb
5 changed files with 71 additions and 61 deletions
|
@ -27,14 +27,34 @@ SQL;
|
|||
SELECT distinct(file_id)
|
||||
FROM cc_schedule
|
||||
WHERE ends > now() AT TIME ZONE 'UTC'
|
||||
AND file_id is not null
|
||||
SQL;
|
||||
$files = $con->query($sql)->fetchAll();
|
||||
$real_files = array();
|
||||
foreach ($files as $f) {
|
||||
$real_files[] = $f['file_id'];
|
||||
}
|
||||
|
||||
return $real_files;
|
||||
}
|
||||
|
||||
public static function getAllFutureScheduledWebstreams()
|
||||
{
|
||||
$con = Propel::getConnection();
|
||||
$sql = <<<SQL
|
||||
SELECT distinct(stream_id)
|
||||
FROM cc_schedule
|
||||
WHERE ends > now() AT TIME ZONE 'UTC'
|
||||
AND stream_id is not null
|
||||
SQL;
|
||||
$streams = $con->query($sql)->fetchAll();
|
||||
$real_streams = array();
|
||||
foreach ($streams as $s) {
|
||||
$real_streams[] = $s['stream_id'];
|
||||
}
|
||||
|
||||
return $real_streams;
|
||||
}
|
||||
/**
|
||||
* Returns data related to the scheduled items.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue