mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
This commit is contained in:
parent
94859aff2e
commit
47254f80e1
3 changed files with 26 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -113,3 +113,5 @@ plugin/WebRTC/WebRTC2RTMP.json
|
|||
plugin/WebRTC/WebRTC2RTMP
|
||||
plugin/API/standAlone/temp_concat_list.txt
|
||||
plugin/API/standAlone/assets/playlist_live_stream_executable
|
||||
btc.log
|
||||
plugin/BTCPayments/
|
||||
|
|
18
plugin/API/infoValidateSiteOwner.php
Normal file
18
plugin/API/infoValidateSiteOwner.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
global $global, $config;
|
||||
if (!isset($global['systemRootPath'])) {
|
||||
require_once '../../videos/configuration.php';
|
||||
}
|
||||
if (!User::isAdmin()) {
|
||||
forbiddenPage('Admin only');
|
||||
}
|
||||
|
||||
$_page = new Page(array('Validate Site Owner'));
|
||||
|
||||
?>
|
||||
<div class="container-fluid">
|
||||
|
||||
</div>
|
||||
<?php
|
||||
$_page->print();
|
||||
?>
|
|
@ -56,7 +56,7 @@ if (!User::canWatchVideo($json->videos_id)) {
|
|||
|
||||
$resp->deleteRemotely = false;
|
||||
$resp->deleteLocally = false;
|
||||
$resp->deleteProgress = false;
|
||||
$resp->deleteProgress = false;
|
||||
|
||||
$video = Video::getVideoLight($json->videos_id);
|
||||
$resp->file = "{$video['filename']}/index.{$json->format}.log";
|
||||
|
@ -92,11 +92,15 @@ if (!$resp->file_exists_on_cdn && empty($_REQUEST['delete']) && file_exists($pro
|
|||
if ($cdnObj->enable_storage) {
|
||||
$resp->lines[] = __LINE__;
|
||||
$remote_path = "{$video['filename']}/index.mp4";
|
||||
$remote_path_mp3 = "{$video['filename']}/index.mp3";
|
||||
$client = CDNStorage::getStorageClient();
|
||||
$resp->deleteRemotely = $client->delete($remote_path);
|
||||
$resp->deleteRemotely_mp3 = $client->delete($remote_path_mp3);
|
||||
}
|
||||
$convertedFile_mp3 = str_replace('/index.mp4', '/index.mp3', $convertedFile);
|
||||
$resp->deleteLocally = unlink($convertedFile);
|
||||
$resp->deleteProgress = unlink($progressFile);
|
||||
$resp->deleteLocally_mp3 = unlink($convertedFile_mp3);
|
||||
$resp->deleteProgress = unlink($progressFile);
|
||||
|
||||
$resp->error = empty($resp->deleteRemotely) && empty($resp->deleteLocally);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue