diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 705d9b520..481b21bbb 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 433cee652..baaedd329 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 6db8a57d0..ab7fb2e4e 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 3a58811b0..313b57889 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