mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Update
This commit is contained in:
parent
73ee4dea39
commit
1033a40056
5 changed files with 23 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -98,3 +98,4 @@ plugin/CustomizeUser/getMyAccount.php
|
|||
/plugin/Gift/
|
||||
/plugin/Rebroadcaster/
|
||||
/plugin/VideoVoteSystem/
|
||||
/plugin/Search/
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue