mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Show active lives in the API
This commit is contained in:
parent
74180dbf4c
commit
645d6daafd
1 changed files with 7 additions and 0 deletions
|
@ -653,6 +653,7 @@ class API extends PluginAbstract {
|
|||
|
||||
$obj->livestream["activeLives"] = array();
|
||||
$obj->livestream["latestLives"] = array();
|
||||
$obj->livestream["scheduledLives"] = array();
|
||||
|
||||
$rows = LiveTransmitionHistory::getActiveLiveFromUser($parameters['users_id'], '','', 100);
|
||||
|
||||
|
@ -671,6 +672,12 @@ class API extends PluginAbstract {
|
|||
$value['joinURL'] = LiveTransmitionHistory::getLinkToLive($value['id']);
|
||||
$obj->livestream["latestLives"][] = $value;
|
||||
}
|
||||
|
||||
$rows = Live_schedule::getAllActiveLimit($users_id);
|
||||
|
||||
foreach ($rows as $value) {
|
||||
$obj->livestream["scheduledLives"][] = $value;
|
||||
}
|
||||
|
||||
return new ApiObject("", false, $obj);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue