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["activeLives"] = array();
$obj->livestream["latestLives"] = array(); $obj->livestream["latestLives"] = array();
$obj->livestream["scheduledLives"] = array();
$rows = LiveTransmitionHistory::getActiveLiveFromUser($parameters['users_id'], '','', 100); $rows = LiveTransmitionHistory::getActiveLiveFromUser($parameters['users_id'], '','', 100);
@ -671,6 +672,12 @@ class API extends PluginAbstract {
$value['joinURL'] = LiveTransmitionHistory::getLinkToLive($value['id']); $value['joinURL'] = LiveTransmitionHistory::getLinkToLive($value['id']);
$obj->livestream["latestLives"][] = $value; $obj->livestream["latestLives"][] = $value;
} }
$rows = Live_schedule::getAllActiveLimit($users_id);
foreach ($rows as $value) {
$obj->livestream["scheduledLives"][] = $value;
}
return new ApiObject("", false, $obj); return new ApiObject("", false, $obj);
} else { } else {