mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Update comments table
This commit is contained in:
parent
177ed74008
commit
6f6b970498
6 changed files with 56 additions and 22 deletions
|
@ -35,9 +35,9 @@ rtmp {
|
||||||
on_play http://avideo/plugin/Live/on_play.php;
|
on_play http://avideo/plugin/Live/on_play.php;
|
||||||
on_record_done http://avideo/plugin/Live/on_record_done.php;
|
on_record_done http://avideo/plugin/Live/on_record_done.php;
|
||||||
|
|
||||||
#exec ffmpeg -re -i rtmp://localhost/live/$name
|
#exec ffmpeg -re -i rtmp://localhost/live/$name
|
||||||
# -c:v libx264 -preset veryfast -vf scale=-2:240 -r 20 -g 40 -keyint_min 40 -sc_threshold 0 -bf 2 -b_strategy 1 -b:v 400k -maxrate 500k -bufsize 1000k -c:a aac -b:a 96k -ac 2 -ar 44100 -f flv rtmp://localhost/adaptive/$name_low
|
# -c:v libx264 -preset veryfast -vf scale=-2:240 -r 20 -g 40 -keyint_min 40 -sc_threshold 0 -bf 2 -b_strategy 1 -b:v 400k -maxrate 500k -bufsize 1000k -c:a aac -b:a 96k -ac 2 -ar 44100 -f flv rtmp://localhost/adaptive/$name_low
|
||||||
# -c:v libx264 -preset veryfast -vf scale=-2:480 -r 30 -g 60 -keyint_min 60 -sc_threshold 0 -bf 2 -b_strategy 1 -b:v 1200k -maxrate 1500k -bufsize 3000k -c:a aac -b:a 128k -ac 2 -ar 44100 -f flv rtmp://localhost/adaptive/$name_mid
|
# -c:v libx264 -preset veryfast -vf scale=-2:480 -r 30 -g 60 -keyint_min 60 -sc_threshold 0 -bf 2 -b_strategy 1 -b:v 1200k -maxrate 1500k -bufsize 3000k -c:a aac -b:a 128k -ac 2 -ar 44100 -f flv rtmp://localhost/adaptive/$name_mid
|
||||||
# -c:v libx264 -preset veryfast -vf scale=-2:720 -r 30 -g 60 -keyint_min 60 -sc_threshold 0 -bf 2 -b_strategy 1 -b:v 2400k -maxrate 2800k -bufsize 5600k -c:a aac -b:a 128k -ac 2 -ar 44100 -f flv rtmp://localhost/adaptive/$name_hi;
|
# -c:v libx264 -preset veryfast -vf scale=-2:720 -r 30 -g 60 -keyint_min 60 -sc_threshold 0 -bf 2 -b_strategy 1 -b:v 2400k -maxrate 2800k -bufsize 5600k -c:a aac -b:a 128k -ac 2 -ar 44100 -f flv rtmp://localhost/adaptive/$name_hi;
|
||||||
|
|
||||||
recorder video {
|
recorder video {
|
||||||
|
@ -157,8 +157,8 @@ http {
|
||||||
# Allow localhost and internal Docker network
|
# Allow localhost and internal Docker network
|
||||||
allow 127.0.0.1;
|
allow 127.0.0.1;
|
||||||
|
|
||||||
# Allow requests from the entire 172.0.0.0/8 range
|
# Allow all IPs in the 172.* range
|
||||||
allow 172.16.0.0/12;
|
allow 172.0.0.0/8;
|
||||||
|
|
||||||
# Deny all other requests
|
# Deny all other requests
|
||||||
deny all;
|
deny all;
|
||||||
|
|
|
@ -5,7 +5,7 @@ if (file_exists("../videos/configuration.php")) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$installationVersion = "14.4";
|
$installationVersion = "14.6";
|
||||||
|
|
||||||
require_once '../objects/functionsSecurity.php';
|
require_once '../objects/functionsSecurity.php';
|
||||||
|
|
||||||
|
|
|
@ -260,25 +260,28 @@ CREATE TABLE IF NOT EXISTS `videos_metadata` (
|
||||||
ON UPDATE CASCADE
|
ON UPDATE CASCADE
|
||||||
) ENGINE = InnoDB;
|
) ENGINE = InnoDB;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `comments`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
CREATE TABLE IF NOT EXISTS `comments` (
|
CREATE TABLE IF NOT EXISTS `comments` (
|
||||||
`id` INT NOT NULL AUTO_INCREMENT,
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
`comment` TEXT NOT NULL,
|
`comment` TEXT NOT NULL,
|
||||||
`videos_id` INT NOT NULL,
|
`videos_id` INT(11) NOT NULL,
|
||||||
`users_id` INT NOT NULL,
|
`users_id` INT(11) NOT NULL,
|
||||||
`created` DATETIME NOT NULL,
|
`created` DATETIME NOT NULL,
|
||||||
`modified` DATETIME NOT NULL,
|
`modified` DATETIME NOT NULL,
|
||||||
`comments_id_pai` INT NULL,
|
`comments_id_pai` INT(11) NULL DEFAULT NULL,
|
||||||
`pin` INT(1) NOT NULL DEFAULT 0 COMMENT 'If = 1 will be on the top',
|
`pin` INT(1) NOT NULL DEFAULT 0 COMMENT 'If = 1 will be on the top',
|
||||||
|
`live_transmitions_history_id` INT(11) NULL DEFAULT NULL,
|
||||||
|
`created_php_time` BIGINT UNSIGNED NULL,
|
||||||
|
`modified_php_time` BIGINT UNSIGNED NULL,
|
||||||
|
`chat_messages_id` INT(11) UNSIGNED NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
INDEX `fk_comments_videos1_idx` (`videos_id` ASC),
|
INDEX `fk_comments_videos1_idx` (`videos_id` ASC),
|
||||||
INDEX `fk_comments_users1_idx` (`users_id` ASC),
|
INDEX `fk_comments_users1_idx` (`users_id` ASC),
|
||||||
INDEX `fk_comments_comments1_idx` (`comments_id_pai` ASC),
|
INDEX `fk_comments_comments1_idx` (`comments_id_pai` ASC),
|
||||||
CONSTRAINT `fk_comments_videos1`
|
INDEX `fk_comments_live_transmitions_history1_idx` (`live_transmitions_history_id` ASC),
|
||||||
FOREIGN KEY (`videos_id`)
|
INDEX `chat_messages_comments` (`chat_messages_id` ASC),
|
||||||
REFERENCES `videos` (`id`)
|
CONSTRAINT `fk_comments_comments1`
|
||||||
|
FOREIGN KEY (`comments_id_pai`)
|
||||||
|
REFERENCES `comments` (`id`)
|
||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
ON UPDATE CASCADE,
|
ON UPDATE CASCADE,
|
||||||
CONSTRAINT `fk_comments_users1`
|
CONSTRAINT `fk_comments_users1`
|
||||||
|
@ -286,11 +289,16 @@ CREATE TABLE IF NOT EXISTS `comments` (
|
||||||
REFERENCES `users` (`id`)
|
REFERENCES `users` (`id`)
|
||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
ON UPDATE CASCADE,
|
ON UPDATE CASCADE,
|
||||||
CONSTRAINT `fk_comments_comments1`
|
CONSTRAINT `fk_comments_videos1`
|
||||||
FOREIGN KEY (`comments_id_pai`)
|
FOREIGN KEY (`videos_id`)
|
||||||
REFERENCES `comments` (`id`)
|
REFERENCES `videos` (`id`)
|
||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
ON UPDATE CASCADE)
|
ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT `fk_comments_live_transmitions_history1`
|
||||||
|
FOREIGN KEY (`live_transmitions_history_id`)
|
||||||
|
REFERENCES `live_transmitions_history` (`id`)
|
||||||
|
ON DELETE SET NULL
|
||||||
|
ON UPDATE SET NULL)
|
||||||
ENGINE = InnoDB;
|
ENGINE = InnoDB;
|
||||||
|
|
||||||
|
|
||||||
|
@ -593,7 +601,7 @@ CREATE TABLE IF NOT EXISTS `category_type_cache` (
|
||||||
`categoryId` int(11) NOT NULL,
|
`categoryId` int(11) NOT NULL,
|
||||||
`type` int(2) NOT NULL COMMENT '0=both, 1=audio, 2=video' DEFAULT 0,
|
`type` int(2) NOT NULL COMMENT '0=both, 1=audio, 2=video' DEFAULT 0,
|
||||||
`manualSet` int(1) NOT NULL COMMENT '0=auto, 1=manual' DEFAULT 0
|
`manualSet` int(1) NOT NULL COMMENT '0=auto, 1=manual' DEFAULT 0
|
||||||
)
|
)
|
||||||
ENGINE=InnoDB;
|
ENGINE=InnoDB;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `categories_has_users_groups` (
|
CREATE TABLE IF NOT EXISTS `categories_has_users_groups` (
|
||||||
|
|
17
updatedb/updateDb.v14.5.sql
Normal file
17
updatedb/updateDb.v14.5.sql
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
ALTER TABLE `comments`
|
||||||
|
ADD COLUMN `live_transmitions_history_id` INT(11) NULL DEFAULT NULL,
|
||||||
|
ADD INDEX `fk_comments_live_transmitions_history1_idx` (`live_transmitions_history_id`),
|
||||||
|
ADD CONSTRAINT `fk_comments_live_transmitions_history1`
|
||||||
|
FOREIGN KEY (`live_transmitions_history_id`)
|
||||||
|
REFERENCES `live_transmitions_history` (`id`)
|
||||||
|
ON DELETE SET NULL
|
||||||
|
ON UPDATE SET NULL;
|
||||||
|
|
||||||
|
ALTER TABLE `comments`
|
||||||
|
ADD COLUMN `created_php_time` BIGINT UNSIGNED NULL;
|
||||||
|
|
||||||
|
ALTER TABLE `comments`
|
||||||
|
ADD COLUMN `modified_php_time` BIGINT UNSIGNED NULL;
|
||||||
|
|
||||||
|
-- Update the version in configurations table
|
||||||
|
UPDATE configurations SET version = '14.5', modified = now() WHERE id = 1;
|
8
updatedb/updateDb.v14.6.sql
Normal file
8
updatedb/updateDb.v14.6.sql
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
ALTER TABLE `comments`
|
||||||
|
ADD COLUMN `chat_messages_id` INT(11) NULL DEFAULT NULL;
|
||||||
|
|
||||||
|
ALTER TABLE `comments`
|
||||||
|
ADD INDEX `chat_messages_comments` (`chat_messages_id`);
|
||||||
|
|
||||||
|
-- Update the version in configurations table
|
||||||
|
UPDATE configurations SET version = '14.6', modified = now() WHERE id = 1;
|
|
@ -138,6 +138,7 @@ $_page->setExtraScripts(
|
||||||
}
|
}
|
||||||
$templine .= $line;
|
$templine .= $line;
|
||||||
if (substr(trim($line), -1, 1) == ';') {
|
if (substr(trim($line), -1, 1) == ';') {
|
||||||
|
//echo $templine;echo '<br><br>';
|
||||||
if (!$global['mysqli']->query($templine)) {
|
if (!$global['mysqli']->query($templine)) {
|
||||||
$obj->error = ('Error performing query \'<strong>' . $templine . '\': ' . $global['mysqli']->error . '<br /><br />');
|
$obj->error = ('Error performing query \'<strong>' . $templine . '\': ' . $global['mysqli']->error . '<br /><br />');
|
||||||
echo json_encode($obj);
|
echo json_encode($obj);
|
||||||
|
@ -188,4 +189,4 @@ $_page->setExtraScripts(
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
$_page->print();
|
$_page->print();
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue