1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
Daniel Neto 2025-03-13 16:24:31 -03:00
parent 10e55424ed
commit f9962a7835

View file

@ -1508,6 +1508,7 @@ class API extends PluginAbstract
* ['public' 1 = live is listed; 0 = not listed] * ['public' 1 = live is listed; 0 = not listed]
* ['APISecret' if passed will not require user and pass] * ['APISecret' if passed will not require user and pass]
* ['users_id' the user ID] * ['users_id' the user ID]
* ['resetKey' send resetKey=1 to reset the key]
* ['user' username if does not have the APISecret] * ['user' username if does not have the APISecret]
* ['pass' password if does not have the APISecret] * ['pass' password if does not have the APISecret]
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}&users_id=1 * @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}&users_id=1
@ -1541,6 +1542,9 @@ class API extends PluginAbstract
$trans->setTitle($parameters['title']); $trans->setTitle($parameters['title']);
$trans->setPublic($parameters['public']); $trans->setPublic($parameters['public']);
if ($obj->id = $trans->save()) { if ($obj->id = $trans->save()) {
if($parameters['resetKey']){
LiveTransmition::resetTransmitionKey($parameters['users_id']);
}
$trans = LiveTransmition::getFromDb($obj->id, true); $trans = LiveTransmition::getFromDb($obj->id, true);
return new ApiObject("", false, $trans); return new ApiObject("", false, $trans);
} else { } else {