mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 02:39:46 +02:00
Update
This commit is contained in:
parent
51cb12d2ee
commit
f38a9536da
3 changed files with 151 additions and 123 deletions
|
@ -525,6 +525,25 @@ function getFFMPEGRemoteLog($keyword)
|
|||
}
|
||||
}
|
||||
|
||||
function stopFFMPEGRemote($keyword)
|
||||
{
|
||||
$obj = AVideoPlugin::getDataObjectIfEnabled('API');
|
||||
if(!empty($obj) && !empty($obj->standAloneFFMPEG)){
|
||||
$url = "{$obj->standAloneFFMPEG}";
|
||||
|
||||
$codeToExec = array('stop'=>1, 'keyword'=>$keyword, 'time'=>time());
|
||||
|
||||
$codeToExecEncrypted = encryptString(json_encode($codeToExec));
|
||||
|
||||
$url = addQueryStringParameter($url, 'APISecret', $obj->APISecret);
|
||||
$url = addQueryStringParameter($url, 'codeToExecEncrypted', $codeToExecEncrypted);
|
||||
_error_log("execFFMPEGAsyncOrRemote: URL $url");
|
||||
return json_decode(url_get_contents($url));
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Function to find the process by keyword using the pid file
|
||||
function findProcess($keyword)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue