1
0
Fork 0
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:
Daniel 2022-03-11 10:26:55 -03:00
parent 74180dbf4c
commit 645d6daafd

View file

@ -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");