1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
This commit is contained in:
Daniel Neto 2024-01-23 12:43:36 -03:00
parent 73ee4dea39
commit 1033a40056
5 changed files with 23 additions and 0 deletions

1
.gitignore vendored
View file

@ -98,3 +98,4 @@ plugin/CustomizeUser/getMyAccount.php
/plugin/Gift/
/plugin/Rebroadcaster/
/plugin/VideoVoteSystem/
/plugin/Search/

View file

@ -10496,6 +10496,7 @@ function getValueOrBlank($array, $default=''){
function getRequestUniqueString(){
$text = getValueOrBlank(['app_bundle','ads_app_bundle', 'publisher_app_bundle']);
$text = getValueOrBlank(['ads_did']);
$text .= getValueOrBlank(['platform']);
$text .= isForKidsSet()?'forKids':'';
return $text;

View file

@ -2842,6 +2842,7 @@ if (!class_exists('Video')) {
$this->removeVideoFiles();
$videosListCache = new VideosListCacheHandler();
$videosListCache->deleteCache();
AVideoPlugin::onDeleteVideo($this->id);
}
_error_log("Video delete id={$this->id} " . json_encode($resp));
return $resp;

View file

@ -882,6 +882,22 @@ class AVideoPlugin
}
}
public static function onDeleteVideo($videos_id)
{
if (empty($videos_id)) {
return false;
}
$plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) {
self::YPTstart();
$p = static::loadPlugin($value['dirName']);
if (is_object($p)) {
$p->onDeleteVideo($videos_id);
}
self::YPTend("{$value['dirName']}::" . __FUNCTION__);
}
}
public static function onEncoderReceiveImage($videos_id)
{
$plugins = Plugin::getAllEnabled();

View file

@ -352,6 +352,10 @@ abstract class PluginAbstract {
return false;
}
public function onDeleteVideo($videos_id) {
return false;
}
public function onVideoLikeDislike($videos_id, $users_id, $isLike) {
return false;
}