1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
Daniel Neto 2025-02-27 15:25:26 -03:00
parent 94859aff2e
commit 47254f80e1
3 changed files with 26 additions and 2 deletions

2
.gitignore vendored
View file

@ -113,3 +113,5 @@ plugin/WebRTC/WebRTC2RTMP.json
plugin/WebRTC/WebRTC2RTMP plugin/WebRTC/WebRTC2RTMP
plugin/API/standAlone/temp_concat_list.txt plugin/API/standAlone/temp_concat_list.txt
plugin/API/standAlone/assets/playlist_live_stream_executable plugin/API/standAlone/assets/playlist_live_stream_executable
btc.log
plugin/BTCPayments/

View 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();
?>

View file

@ -56,7 +56,7 @@ if (!User::canWatchVideo($json->videos_id)) {
$resp->deleteRemotely = false; $resp->deleteRemotely = false;
$resp->deleteLocally = false; $resp->deleteLocally = false;
$resp->deleteProgress = false; $resp->deleteProgress = false;
$video = Video::getVideoLight($json->videos_id); $video = Video::getVideoLight($json->videos_id);
$resp->file = "{$video['filename']}/index.{$json->format}.log"; $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) { if ($cdnObj->enable_storage) {
$resp->lines[] = __LINE__; $resp->lines[] = __LINE__;
$remote_path = "{$video['filename']}/index.mp4"; $remote_path = "{$video['filename']}/index.mp4";
$remote_path_mp3 = "{$video['filename']}/index.mp3";
$client = CDNStorage::getStorageClient(); $client = CDNStorage::getStorageClient();
$resp->deleteRemotely = $client->delete($remote_path); $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->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); $resp->error = empty($resp->deleteRemotely) && empty($resp->deleteLocally);
} else { } else {