diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 705d9b5200e8a53a0ad097bf4f785e27648e3e21..481b21bbb2e3ffaa1b0c8697671b018fa7808ba3 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -226,7 +226,7 @@ const CONSTRAINTS_FIELDS = { COUNT: { min: 0 } }, VIDEO_COMMENTS: { - TEXT: { min: 2, max: 3000 }, // Length + TEXT: { min: 1, max: 3000 }, // Length URL: { min: 3, max: 2000 } // Length }, VIDEO_SHARE: { diff --git a/server/tools/import-videos.ts b/server/tools/import-videos.ts index 433cee6525e06971ba19a64d28def7afd2cff1f2..baaedd329df29c361c5cc043763b7215563fd4a1 100644 --- a/server/tools/import-videos.ts +++ b/server/tools/import-videos.ts @@ -53,7 +53,10 @@ async function run () { const options = [ '-j', '--flat-playlist', '--playlist-reverse' ] youtubeDL.getInfo(program['targetUrl'], options, processOptions, async (err, info) => { - if (err) throw err + if (err) { + console.log(err.message) + process.exit(1) + } let infoArray: any[] @@ -157,7 +160,8 @@ async function uploadVideoOnPeerTube (videoInfo: any, videoPath: string, languag await uploadVideo(program['url'], accessToken, videoAttributes) } else { - throw err + console.log(err.message) + process.exit(1) } } diff --git a/support/doc/dependencies.md b/support/doc/dependencies.md index 6db8a57d06ce8db61c16a69eab39cd8bc347b53a..ab7fb2e4e8753f21aa4c92bf62b87b96bcae8237 100644 --- a/support/doc/dependencies.md +++ b/support/doc/dependencies.md @@ -46,15 +46,19 @@ $ sudo pacman -S nodejs yarn ffmpeg postgresql openssl redis git wget unzip pyth 2. Install yarn: [https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install) 3. Install or compile ffmpeg: - * Install - [https://www.webfoobar.com/index.php/node/17](https://www.webfoobar.com/index.php/node/17) + * Install - [https://linoxide.com/linux-how-to/install-ffmpeg-centos-7/](https://linoxide.com/linux-how-to/install-ffmpeg-centos-7/) * Compile - [https://gist.github.com/mustafaturan/7053900#file-latest-ffmpeg-centos6-sh](https://gist.github.com/mustafaturan/7053900#file-latest-ffmpeg-centos6-sh) 4. Run: ``` $ sudo yum update -$ sudo yum install epel-release +$ sudo yum install epel-release centos-release-scl $ sudo yum update -$ sudo yum install nginx postgresql postgresql-server openssl gcc make redis git +$ sudo yum install nginx postgresql postgresql-server openssl gcc-c++ make redis git devtoolset-6 +``` + + 5. You need to use a more up to date version of G++ in order to run the yarn install command, hence the installation of devtoolset-6. +$ sudo scl devtoolset-6 bash ``` ## Other distributions diff --git a/support/doc/production.md b/support/doc/production.md index 3a58811b006fde7dbe4b8dbd021053c4209e815f..313b57889cee266c52fbabd4ce307358dc2d8970 100644 --- a/support/doc/production.md +++ b/support/doc/production.md @@ -51,7 +51,11 @@ $ sudo -u peertube wget -q "https://github.com/Chocobozzz/PeerTube/releases/down $ sudo -u peertube unzip peertube-${VERSION}.zip && sudo -u peertube rm peertube-${VERSION}.zip ``` -Install Peertube +Install Peertube. If you're using CentOS7, do not forget to activate the devtoolset-6 software collection: +``` +$ scl enable devtool-6 bash +``` +And after that, follow the step as usual. Do not forget to exit the environment after installing Peertube. ``` $ cd ../ && sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest $ cd ./peertube-latest && sudo -H -u peertube yarn install --production --pure-lockfile