A few sentences describing the overall goals of the pull request’s commits.
List related task, documentation, pull requests, etc.
| { | |
| "@context": [ | |
| "https://www.w3.org/ns/activitystreams", | |
| { | |
| "owl": "http://www.w3.org/2002/07/owl#", | |
| "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", | |
| "rdfs": "http://www.w3.org/2000/01/rdf-schema#", | |
| "schema": "http://schema.org/", | |
| "xsd": "http://www.w3.org/2001/XMLSchema#" | |
| }, |
| HotkeyModule.forRoot({ | |
| cheatSheetCloseEsc: true, | |
| cheatSheetDescription: this.i18n('Show / hide this help menu') | |
| }) |
| async function getVersion () { | |
| const tag = await require('child_process') | |
| .exec('[ ! -d .git ] || git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || true', { stdio: [0,1,2] }) | |
| if (tag) return tag.replace(/^v/, '') | |
| const version = await require('child_process') | |
| .exec('[ ! -d .git ] || git rev-parse --short HEAD') | |
| if (version) return version.toString().trim() | |
| return require('../../../package.json').version |
| diff --git server/helpers/ffmpeg-utils.ts server/helpers/ffmpeg-utils.ts | |
| index ed823a67..92025092 100644 | |
| --- server/helpers/ffmpeg-utils.ts | |
| +++ server/helpers/ffmpeg-utils.ts | |
| @@ -116,10 +116,6 @@ type TranscodeOptions = { | |
| function transcode (options: TranscodeOptions) { | |
| return new Promise<void>(async (res, rej) => { | |
| - if (options.resolution === undefined) { | |
| - return rej('Invalid video file') |
| import { | |
| ComponentFixture, | |
| TestBed | |
| } from '@angular/core/testing' | |
| import { FormsModule, ReactiveFormsModule } from '@angular/forms' | |
| import { RouterTestingModule } from '@angular/router/testing' | |
| import { VideosProvider, VideoService } from '../../shared/video/video.service' | |
| import { VideoUpdateComponent } from '../+video-edit/video-update.component' | |
| import { VideoEditComponent } from '../+video-edit/shared/video-edit.component' | |
| import { VideosModule } from '../videos.module' |
| async function isVideoFileStreamable (path: string): Promise<{ [key: string]: boolean }> { | |
| let stream = fs.createReadStream(path, { | |
| encoding: null, | |
| start: 0, | |
| end: 1024 * 1024 | |
| }) | |
| const isAVC = (await getVideoFileStream(path)).filter(s => { | |
| return s['codec_name'] === 'h264' && | |
| s['bit_rate'] < 3000000 |
| #!/bin/bash | |
| # source this file in /root/.bashrc or /root/.zshrc | |
| # Sets up the server for chrooted users | |
| configure_chrooted() { | |
| grep ^chrooted: /etc/group | |
| if [[ $? == 0 ]]; then | |
| printf "The chrooted group already exists, aborting...\n" | |
| exit 1 |
| /* | |
| we check feed validity using: | |
| - XSD for RSS 2.0 -> https://raw.githubusercontent.com/ultraq/rss-xml-generator/master/Schema/RSS-2.0.xsd | |
| - JSON Schema for… JSON Feed -> https://raw.githubusercontent.com/sonicdoe/jsonfeed-schema/master/schema-v1.json | |
| */ | |
| const JSONFeedInstanceJSONSchema = require('jsonfeed-schema') | |
| JSONFeedInstanceJSONSchema.properties.items.items.additionalProperties = true | |
| async function loadXSD (path): Promise<string> { |
| # requires WebSocket support with `a2enmod proxy_wstunnel` | |
| # check https://ssl-config.mozilla.org/#server=apache&version=2.4.41&config=modern&openssl=1.1.1d&hsts=false&ocsp=false&guideline=5.6 for hardening security | |
| <VirtualHost *:80 [::]:80> | |
| ServerName peertube.example.com | |
| ServerAdmin [email protected] | |
| Protocols h2c http/1.1 | |
| RewriteEngine On | |
| RewriteCond %{REQUEST_URI} !^/\.well\-known/acme\-challenge/ |