mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Add support for YPT Storage
This commit is contained in:
parent
1cd325e608
commit
7dcc3bfa9f
9 changed files with 280 additions and 107 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -52,3 +52,4 @@
|
|||
/plugin/User_Controll/
|
||||
/plugin/FlixHouse/
|
||||
/plugin/Video_Location_Block/
|
||||
/plugin/YPTStorage/
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
$installationVersion = "7.2";
|
||||
$installationVersion = "7.3";
|
||||
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
|
|
@ -82,6 +82,16 @@ CREATE TABLE IF NOT EXISTS `categories` (
|
|||
ON UPDATE CASCADE)
|
||||
ENGINE = InnoDB;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `sites` (
|
||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` VARCHAR(255) NULL DEFAULT NULL,
|
||||
`url` VARCHAR(255) NOT NULL,
|
||||
`created` DATETIME NULL DEFAULT NULL,
|
||||
`modified` DATETIME NULL DEFAULT NULL,
|
||||
`status` CHAR(1) NULL DEFAULT NULL,
|
||||
`secret` VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY (`id`))
|
||||
ENGINE = InnoDB;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `videos`
|
||||
|
@ -121,12 +131,19 @@ CREATE TABLE IF NOT EXISTS `videos` (
|
|||
`rrating` VARCHAR(45) NULL DEFAULT NULL,
|
||||
`externalOptions` TEXT NULL DEFAULT NULL,
|
||||
`only_for_paid` TINYINT(1) NULL DEFAULT NULL,
|
||||
`sites_id` INT(11) NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `fk_videos_users_idx` (`users_id` ASC),
|
||||
INDEX `fk_videos_categories1_idx` (`categories_id` ASC),
|
||||
UNIQUE INDEX `clean_title_UNIQUE` (`clean_title` ASC),
|
||||
INDEX `index5` (`order` ASC),
|
||||
INDEX `fk_videos_videos1_idx` (`next_videos_id` ASC),
|
||||
INDEX `fk_videos_sites1_idx` (`sites_id` ASC),
|
||||
CONSTRAINT `fk_videos_sites1`
|
||||
FOREIGN KEY (`sites_id`)
|
||||
REFERENCES `sites` (`id`)
|
||||
ON DELETE NO ACTION
|
||||
ON UPDATE NO ACTION,
|
||||
CONSTRAINT `fk_videos_users`
|
||||
FOREIGN KEY (`users_id`)
|
||||
REFERENCES `users` (`id`)
|
||||
|
|
|
@ -7,40 +7,47 @@ if (!isCommandLineInterface()) {
|
|||
return die('Command Line only');
|
||||
}
|
||||
|
||||
$fileExtensions = array('jpg', 'mp4', 'webm');
|
||||
$fileExtensions = array('jpg', 'gif', 'mp4', 'webm');
|
||||
|
||||
|
||||
$files = array();
|
||||
|
||||
foreach (glob("../videos/*.{" . implode(",", $fileExtensions) . "}", GLOB_BRACE) as $filename) {
|
||||
//foreach (glob("../videos/*.{" . implode(",", $fileExtensions) . "}", GLOB_BRACE) as $filename) {
|
||||
foreach (glob("../videos/*", GLOB_BRACE) as $filename) {
|
||||
$base = basename($filename);
|
||||
|
||||
$baseName = explode("_portrait", $base);
|
||||
if (!empty($baseName[1])) {
|
||||
$files[$base] = array($baseName[0], $filename);
|
||||
if (is_dir($filename)) {
|
||||
if (strpos($base, "_YPTuniqid_") !== false) {
|
||||
$files[$base] = array($base, $filename);
|
||||
}
|
||||
} else {
|
||||
$baseName = explode("_thumbs", $base);
|
||||
|
||||
$baseName = explode("_portrait", $base);
|
||||
if (!empty($baseName[1])) {
|
||||
$files[$base] = array($baseName[0], $filename);
|
||||
} else {
|
||||
$types = array('_HD', '_Low', '_SD');
|
||||
$notFound = true;
|
||||
foreach ($types as $value) {
|
||||
$baseName = explode($value, $base);
|
||||
if (!empty($baseName[1])) {
|
||||
$files[$base] = array($baseName[0], $filename);
|
||||
$notFound = false;
|
||||
}
|
||||
}
|
||||
if ($notFound) {
|
||||
foreach ($fileExtensions as $value) {
|
||||
if (strpos($base, ".$value") === false) {
|
||||
continue;
|
||||
}
|
||||
$baseName = str_replace("." . $value, "", $base);
|
||||
$baseName = explode("_thumbs", $base);
|
||||
if (!empty($baseName[1])) {
|
||||
$files[$base] = array($baseName[0], $filename);
|
||||
} else {
|
||||
$types = array('_HD', '_Low', '_SD');
|
||||
$notFound = true;
|
||||
foreach ($types as $value) {
|
||||
$baseName = explode($value, $base);
|
||||
if (!empty($baseName[1])) {
|
||||
if (!in_array($baseName, $files)) {
|
||||
$files[$base] = array($baseName, $filename);
|
||||
$files[$base] = array($baseName[0], $filename);
|
||||
$notFound = false;
|
||||
}
|
||||
}
|
||||
if ($notFound) {
|
||||
foreach ($fileExtensions as $value) {
|
||||
if (strpos($base, ".$value") === false) {
|
||||
continue;
|
||||
}
|
||||
$baseName = str_replace("." . $value, "", $base);
|
||||
if (!empty($baseName[1])) {
|
||||
if (!in_array($baseName, $files)) {
|
||||
$files[$base] = array($baseName, $filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,16 +67,24 @@ $totalSize = 0;
|
|||
foreach ($files as $key => $value) {
|
||||
$size = filesize($value[1]);
|
||||
$totalSize += $size;
|
||||
echo "{$value[0]} => $value[1] ".(humanFileSize($size))." \n";
|
||||
echo "{$value[0]} => $value[1] " . (humanFileSize($size)) . " \n";
|
||||
}
|
||||
echo "*** Confirm Delete Them (".humanFileSize($totalSize).")? y/n: ";
|
||||
echo "*** Confirm Delete Them (" . humanFileSize($totalSize) . ")? y/n: ";
|
||||
ob_flush();
|
||||
$confirm = trim(readline(""));
|
||||
if (!empty($confirm) && strtolower($confirm)==='y') {
|
||||
if (!empty($confirm) && strtolower($confirm) === 'y') {
|
||||
foreach ($files as $key => $value) {
|
||||
if(unlink($value[1])){
|
||||
if (is_dir($value[1])) {
|
||||
rrmdir($value[1]);
|
||||
if (is_dir($value[1])) {
|
||||
echo "$value[1] Directory Deleted \n";
|
||||
} else {
|
||||
echo "$value[1] Directory Could Not be Deleted \n";
|
||||
}
|
||||
} else
|
||||
if (unlink($value[1])) {
|
||||
echo "$value[1] Deleted \n";
|
||||
}else{
|
||||
} else {
|
||||
echo "$value[1] Could Not be Deleted \n";
|
||||
}
|
||||
}
|
||||
|
|
64
objects/sites.php
Normal file
64
objects/sites.php
Normal file
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
global $global, $config;
|
||||
if(!isset($global['systemRootPath'])){
|
||||
require_once '../videos/configuration.php';
|
||||
}
|
||||
class Sites extends ObjectYPT {
|
||||
protected $name, $url, $status, $secret;
|
||||
|
||||
public static function getSearchFieldsNames() {
|
||||
return array('name', 'url');
|
||||
}
|
||||
|
||||
public static function getTableName() {
|
||||
return 'sites';
|
||||
}
|
||||
|
||||
function getName() {
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
function getUrl() {
|
||||
return $this->url;
|
||||
}
|
||||
|
||||
function getStatus() {
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
function setName($name) {
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
function setUrl($url) {
|
||||
$this->url = $url;
|
||||
}
|
||||
|
||||
function setStatus($status) {
|
||||
$this->status = $status;
|
||||
}
|
||||
|
||||
function getSecret() {
|
||||
return $this->secret;
|
||||
}
|
||||
|
||||
function setSecret($secret) {
|
||||
$this->secret = $secret;
|
||||
}
|
||||
|
||||
function save() {
|
||||
if(empty($this->getSecret())){
|
||||
$this->setSecret(md5(uniqid()));
|
||||
}
|
||||
|
||||
$siteURL = $this->getUrl();
|
||||
if (substr($siteURL, -1) !== '/') {
|
||||
$siteURL .= "/";
|
||||
}
|
||||
$this->setUrl($siteURL);
|
||||
return parent::save();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -10,6 +10,7 @@ require_once $global['systemRootPath'] . 'objects/user.php';
|
|||
require_once $global['systemRootPath'] . 'objects/category.php';
|
||||
require_once $global['systemRootPath'] . 'objects/include_config.php';
|
||||
require_once $global['systemRootPath'] . 'objects/video_statistic.php';
|
||||
require_once $global['systemRootPath'] . 'objects/sites.php';
|
||||
if (!class_exists('Video')) {
|
||||
|
||||
class Video {
|
||||
|
@ -43,6 +44,7 @@ if (!class_exists('Video')) {
|
|||
private $only_for_paid;
|
||||
private $rrating;
|
||||
private $externalOptions;
|
||||
private $sites_id;
|
||||
static $statusDesc = array(
|
||||
'a' => 'active',
|
||||
'i' => 'inactive',
|
||||
|
@ -140,6 +142,14 @@ if (!class_exists('Video')) {
|
|||
$this->users_id = $users_id;
|
||||
}
|
||||
|
||||
function getSites_id() {
|
||||
return $this->sites_id;
|
||||
}
|
||||
|
||||
function setSites_id($sites_id) {
|
||||
$this->sites_id = $sites_id;
|
||||
}
|
||||
|
||||
function save($updateVideoGroups = false, $allowOfflineUser = false) {
|
||||
global $advancedCustom;
|
||||
if (!User::isLogged() && !$allowOfflineUser) {
|
||||
|
@ -207,6 +217,11 @@ if (!class_exists('Video')) {
|
|||
$this->next_videos_id = 'NULL';
|
||||
}
|
||||
|
||||
$this->sites_id = intval($this->sites_id);
|
||||
if (empty($this->sites_id)) {
|
||||
$this->sites_id = 'NULL';
|
||||
}
|
||||
|
||||
$this->can_download = intval($this->can_download);
|
||||
$this->can_share = intval($this->can_share);
|
||||
$this->only_for_paid = intval($this->only_for_paid);
|
||||
|
@ -220,12 +235,12 @@ if (!class_exists('Video')) {
|
|||
$sql = "UPDATE videos SET title = '{$this->title}',clean_title = '{$this->clean_title}',"
|
||||
. " filename = '{$this->filename}', categories_id = '{$this->categories_id}', status = '{$this->status}',"
|
||||
. " description = '{$this->description}', duration = '{$this->duration}', type = '{$this->type}', videoDownloadedLink = '{$this->videoDownloadedLink}', youtubeId = '{$this->youtubeId}', videoLink = '{$this->videoLink}', next_videos_id = {$this->next_videos_id}, isSuggested = {$this->isSuggested}, users_id = {$this->users_id}, "
|
||||
. " trailer1 = '{$this->trailer1}', trailer2 = '{$this->trailer2}', trailer3 = '{$this->trailer3}', rate = '{$this->rate}', can_download = '{$this->can_download}', can_share = '{$this->can_share}', only_for_paid = '{$this->only_for_paid}', rrating = '{$this->rrating}', externalOptions = '{$this->externalOptions}' , modified = now()"
|
||||
. " trailer1 = '{$this->trailer1}', trailer2 = '{$this->trailer2}', trailer3 = '{$this->trailer3}', rate = '{$this->rate}', can_download = '{$this->can_download}', can_share = '{$this->can_share}', only_for_paid = '{$this->only_for_paid}', rrating = '{$this->rrating}', externalOptions = '{$this->externalOptions}', sites_id = {$this->sites_id} , modified = now()"
|
||||
. " WHERE id = {$this->id}";
|
||||
} else {
|
||||
$sql = "INSERT INTO videos "
|
||||
. "(title,clean_title, filename, users_id, categories_id, status, description, duration,type,videoDownloadedLink, next_videos_id, created, modified, videoLink, can_download, can_share, only_for_paid, rrating, externalOptions) values "
|
||||
. "('{$this->title}','{$this->clean_title}', '{$this->filename}', {$this->users_id},{$this->categories_id}, '{$this->status}', '{$this->description}', '{$this->duration}', '{$this->type}', '{$this->videoDownloadedLink}', {$this->next_videos_id},now(), now(), '{$this->videoLink}', '{$this->can_download}', '{$this->can_share}','{$this->only_for_paid}', '{$this->rrating}', '$this->externalOptions')";
|
||||
. "(title,clean_title, filename, users_id, categories_id, status, description, duration,type,videoDownloadedLink, next_videos_id, created, modified, videoLink, can_download, can_share, only_for_paid, rrating, externalOptions, sites_id) values "
|
||||
. "('{$this->title}','{$this->clean_title}', '{$this->filename}', {$this->users_id},{$this->categories_id}, '{$this->status}', '{$this->description}', '{$this->duration}', '{$this->type}', '{$this->videoDownloadedLink}', {$this->next_videos_id},now(), now(), '{$this->videoLink}', '{$this->can_download}', '{$this->can_share}','{$this->only_for_paid}', '{$this->rrating}', '$this->externalOptions', {$this->sites_id})";
|
||||
}
|
||||
$insert_row = sqlDAL::writeSql($sql);
|
||||
if ($insert_row) {
|
||||
|
@ -243,6 +258,7 @@ if (!class_exists('Video')) {
|
|||
} else {
|
||||
$id = $this->id;
|
||||
}
|
||||
self::deleteTagsAsync($this->id);
|
||||
if ($updateVideoGroups) {
|
||||
require_once $global['systemRootPath'] . 'objects/userGroups.php';
|
||||
// update the user groups
|
||||
|
@ -545,7 +561,7 @@ if (!class_exists('Video')) {
|
|||
return " AND " . $sql;
|
||||
}
|
||||
|
||||
static function getVideo($id = "", $status = "viewable", $ignoreGroup = false, $random = false, $suggetedOnly = false, $showUnlisted = false) {
|
||||
static function getVideo($id = "", $status = "viewable", $ignoreGroup = false, $random = false, $suggetedOnly = false, $showUnlisted = false, $ignoreTags = false) {
|
||||
global $global, $config;
|
||||
if ($config->currentVersionLowerThen('5')) {
|
||||
return false;
|
||||
|
@ -678,14 +694,16 @@ if (!class_exists('Video')) {
|
|||
$video['title'] = UTF8encode($video['title']);
|
||||
$video['description'] = UTF8encode($video['description']);
|
||||
$video['progress'] = self::getVideoPogressPercent($video['id']);
|
||||
$video['tags'] = self::getTags($video['id']);
|
||||
if(!$ignoreTags){
|
||||
$video['tags'] = self::getTags($video['id']);
|
||||
}
|
||||
if (!empty($video['externalOptions'])) {
|
||||
$video['externalOptions'] = json_decode($video['externalOptions']);
|
||||
} else {
|
||||
$video['externalOptions'] = new stdClass();
|
||||
}
|
||||
|
||||
if (YouPHPTubePlugin::isEnabledByName("VideoTags")) {
|
||||
if (!$ignoreTags && YouPHPTubePlugin::isEnabledByName("VideoTags")) {
|
||||
$video['videoTags'] = Tags::getAllFromVideosId($video['id']);
|
||||
$video['videoTagsObject'] = Tags::getObjectFromVideosId($video['id']);
|
||||
}
|
||||
|
@ -702,17 +720,15 @@ if (!class_exists('Video')) {
|
|||
global $global, $config;
|
||||
$id = intval($id);
|
||||
$sql = "SELECT * FROM videos WHERE id = '$id' LIMIT 1";
|
||||
$res = sqlDAL::readSql($sql);
|
||||
$res = sqlDAL::readSql($sql, "", array(), true);
|
||||
$video = sqlDAL::fetchAssoc($res);
|
||||
sqlDAL::close($res);
|
||||
return $video;
|
||||
}
|
||||
|
||||
static function getVideoFromFileName($fileName, $ignoreGroup = false) {
|
||||
//error_log('Enter getVideoFromFileName ('.$fileName.')');
|
||||
static function getVideoFromFileName($fileName, $ignoreGroup = false, $ignoreTags = false) {
|
||||
global $global;
|
||||
if (empty($fileName)) {
|
||||
//error_log("getVideoFromFileName ERROR File name is empty ");
|
||||
return false;
|
||||
}
|
||||
$sql = "SELECT id FROM videos WHERE filename = ? LIMIT 1";
|
||||
|
@ -722,11 +738,25 @@ if (!class_exists('Video')) {
|
|||
$video = sqlDAL::fetchAssoc($res);
|
||||
sqlDAL::close($res);
|
||||
if (!empty($video['id'])) {
|
||||
return self::getVideo($video['id'], "", $ignoreGroup, false, false, true);
|
||||
return self::getVideo($video['id'], "", $ignoreGroup, false, false, true, $ignoreTags);
|
||||
}
|
||||
//$video['groups'] = UserGroups::getVideoGroups($video['id']);
|
||||
}
|
||||
//error_log(" Not Found getVideoFromFileName({$fileName}) ");
|
||||
return false;
|
||||
}
|
||||
|
||||
static function getVideoFromFileNameLight($fileName) {
|
||||
global $global;
|
||||
if (empty($fileName)) {
|
||||
return false;
|
||||
}
|
||||
$sql = "SELECT * FROM videos WHERE filename = ? LIMIT 1";
|
||||
|
||||
$res = sqlDAL::readSql($sql, "s", array($fileName));
|
||||
if ($res != false) {
|
||||
$video = sqlDAL::fetchAssoc($res);
|
||||
sqlDAL::close($res);
|
||||
return $video;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1225,7 +1255,7 @@ if (!class_exists('Video')) {
|
|||
if (!empty($this->id)) {
|
||||
$this->removeNextVideos($this->id);
|
||||
$this->removeTrailerReference($this->id);
|
||||
$video = self::getVideo($this->id);
|
||||
$video = self::getVideoLight($this->id);
|
||||
$sql = "DELETE FROM videos WHERE id = ?";
|
||||
} else {
|
||||
return false;
|
||||
|
@ -1237,6 +1267,7 @@ if (!class_exists('Video')) {
|
|||
$aws_s3 = YouPHPTubePlugin::loadPluginIfEnabled('AWS_S3');
|
||||
$bb_b2 = YouPHPTubePlugin::loadPluginIfEnabled('Blackblaze_B2');
|
||||
$ftp = YouPHPTubePlugin::loadPluginIfEnabled('FTP_Storage');
|
||||
$YPTStorage = YouPHPTubePlugin::loadPluginIfEnabled('YPTStorage');
|
||||
if (!empty($aws_s3)) {
|
||||
$aws_s3->removeFiles($video['filename']);
|
||||
}
|
||||
|
@ -1246,6 +1277,9 @@ if (!class_exists('Video')) {
|
|||
if (!empty($ftp)) {
|
||||
$ftp->removeFiles($video['filename']);
|
||||
}
|
||||
if (!empty($YPTStorage)) {
|
||||
$YPTStorage->removeFiles($video['filename'], $video['sites_id']);
|
||||
}
|
||||
$this->removeFiles($video['filename']);
|
||||
self::deleteThumbs($video['filename']);
|
||||
}
|
||||
|
@ -1705,10 +1739,14 @@ if (!class_exists('Video')) {
|
|||
}
|
||||
|
||||
static function deleteTagsAsync($video_id) {
|
||||
global $global;
|
||||
if (empty($video_id)) {
|
||||
return false;
|
||||
}
|
||||
global $global, $advancedCustom;
|
||||
if (session_status() == PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
unset($_SESSION['getVideoTags'][$video_id]);
|
||||
$path = $global['systemRootPath'] . "videos/cache/getTagsAsync/";
|
||||
if(!is_dir($path)){
|
||||
return false;
|
||||
|
@ -2087,10 +2125,17 @@ if (!class_exists('Video')) {
|
|||
if ($type == ".m3u8") {
|
||||
$source['path'] = "{$global['systemRootPath']}videos/{$filename}/index{$type}";
|
||||
}
|
||||
$video = Video::getVideoFromFileName(str_replace(array('_Low', '_SD', '_HD'), array('', '', ''), $filename));
|
||||
$video = Video::getVideoFromFileNameLight(str_replace(array('_Low', '_SD', '_HD'), array('', '', ''), $filename));
|
||||
$canUseCDN = canUseCDN($video['id']);
|
||||
//error_log(json_encode(array('$filename'=>$filename, '$advancedCustom->videosCDN'=>$advancedCustom->videosCDN,'canUseCDN($video[id])'=>canUseCDN($video['id']),'$video[id]'=>$video['id'])));
|
||||
if (!empty($advancedCustom->videosCDN) && $canUseCDN) {
|
||||
|
||||
if (!empty($video['sites_id']) && ($type == ".mp3" || $type == ".mp4" || $type == ".webm" || $type == ".m3u8")) {
|
||||
$site = new Sites($video['sites_id']);
|
||||
$siteURL = rtrim($site->getUrl(), '/') . '/';
|
||||
$source['url'] = "{$siteURL}videos/{$filename}{$type}{$token}";
|
||||
if ($type == ".m3u8") {
|
||||
$source['url'] = "{$siteURL}videos/{$filename}/index{$type}{$token}";
|
||||
}
|
||||
} else if (!empty($advancedCustom->videosCDN) && $canUseCDN) {
|
||||
$advancedCustom->videosCDN = rtrim($advancedCustom->videosCDN, '/') . '/';
|
||||
$source['url'] = "{$advancedCustom->videosCDN}videos/{$filename}{$type}{$token}";
|
||||
if ($type == ".m3u8") {
|
||||
|
|
31
updatedb/updateDb.v7.3.sql
Normal file
31
updatedb/updateDb.v7.3.sql
Normal file
|
@ -0,0 +1,31 @@
|
|||
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
|
||||
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
|
||||
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `sites` (
|
||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` VARCHAR(255) NULL DEFAULT NULL,
|
||||
`url` VARCHAR(255) NOT NULL,
|
||||
`created` DATETIME NULL DEFAULT NULL,
|
||||
`modified` DATETIME NULL DEFAULT NULL,
|
||||
`status` CHAR(1) NULL DEFAULT NULL,
|
||||
`secret` VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY (`id`))
|
||||
ENGINE = InnoDB;
|
||||
|
||||
ALTER TABLE `videos`
|
||||
ADD COLUMN `sites_id` INT(11) NULL,
|
||||
ADD INDEX `fk_videos_sites1_idx` (`sites_id` ASC);
|
||||
|
||||
ALTER TABLE `videos`
|
||||
ADD CONSTRAINT `fk_videos_sites1`
|
||||
FOREIGN KEY (`sites_id`)
|
||||
REFERENCES `sites` (`id`)
|
||||
ON DELETE NO ACTION
|
||||
ON UPDATE NO ACTION;
|
||||
|
||||
UPDATE configurations SET version = '7.3', modified = now() WHERE id = 1;
|
||||
|
||||
SET SQL_MODE=@OLD_SQL_MODE;
|
||||
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
|
||||
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
|
|
@ -745,14 +745,14 @@ echo YouPHPTubePlugin::getManagerVideosJavaScripts();
|
|||
clearTimeout(timeOut);
|
||||
timeOut = setTimeout(function () {
|
||||
$("#grid").bootgrid('reload');
|
||||
}, 2000);
|
||||
}, 5000);
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
checkProgress();
|
||||
}, 1000);
|
||||
}, 3000);
|
||||
} else if (encodingNowId !== "") {
|
||||
$("#encodeProgress" + encodingNowId).slideUp("normal", function () {
|
||||
$(this).remove();
|
||||
|
@ -760,11 +760,11 @@ echo YouPHPTubePlugin::getManagerVideosJavaScripts();
|
|||
encodingNowId = "";
|
||||
setTimeout(function () {
|
||||
checkProgress();
|
||||
}, 5000);
|
||||
}, 10000);
|
||||
} else {
|
||||
setTimeout(function () {
|
||||
checkProgress();
|
||||
}, 5000);
|
||||
}, 10000);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue