mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +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);
|
||||
|
||||
|
@ -672,6 +673,12 @@ class API extends PluginAbstract {
|
|||
$obj->livestream["latestLives"][] = $value;
|
||||
}
|
||||
|
||||
$rows = Live_schedule::getAllActiveLimit($users_id);
|
||||
|
||||
foreach ($rows as $value) {
|
||||
$obj->livestream["scheduledLives"][] = $value;
|
||||
}
|
||||
|
||||
return new ApiObject("", false, $obj);
|
||||
} else {
|
||||
return new ApiObject("API Secret is not valid");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue