1
0
Fork 0

Merge branch 'release/3.2.0' into develop

This commit is contained in:
Chocobozzz 2021-05-14 14:18:13 +02:00
commit 5b1a6d45b5
No known key found for this signature in database
GPG key ID: 583A612D890159BE
10 changed files with 14 additions and 12 deletions

View file

@ -100,7 +100,7 @@
<div class="peertube-select-container"> <div class="peertube-select-container">
<select id="broadcastMessageLevel" formControlName="level" class="form-control"> <select id="broadcastMessageLevel" formControlName="level" class="form-control">
<option value="info">info</option> <option value="info">info</option>
<option value="warning">warning</option> <option value="warn">warning</option>
<option value="error">error</option> <option value="error">error</option>
</select> </select>
</div> </div>

View file

@ -42,7 +42,7 @@ export class ActorBannerEditComponent implements OnInit {
this.bannerExtensions = config.banner.file.extensions.join(', ') this.bannerExtensions = config.banner.file.extensions.join(', ')
// tslint:disable:max-line-length // tslint:disable:max-line-length
this.bannerFormat = $localize`ratio 6/1, recommended size: 1600x266, max size: ${getBytes(this.maxBannerSize)}, extensions: ${this.bannerExtensions}` this.bannerFormat = $localize`ratio 6/1, recommended size: 1920x317, max size: ${getBytes(this.maxBannerSize)}, extensions: ${this.bannerExtensions}`
}) })
} }

View file

@ -89,9 +89,9 @@ class StatsCard extends Component {
this.container.style.display = 'block' this.container.style.display = 'block'
this.updateInterval = setInterval(async () => { this.updateInterval = setInterval(async () => {
try { try {
const options = this.mode === 'webtorrent' const options = this.mode === 'p2p-media-loader'
? await this.buildWebTorrentOptions() ? await this.buildHLSOptions()
: await this.buildHLSOptions() : await this.buildWebTorrentOptions() // Default
this.list.innerHTML = this.getListTemplate(options) this.list.innerHTML = this.getListTemplate(options)
} catch (err) { } catch (err) {
@ -212,7 +212,7 @@ class StatsCard extends Component {
: undefined : undefined
return ` return `
${this.buildElement(player.localize('Player mode'), this.options_.mode)} ${this.buildElement(player.localize('Player mode'), this.mode || 'HTTP')}
${this.buildElement(player.localize('Video UUID'), this.options_.videoUUID)} ${this.buildElement(player.localize('Video UUID'), this.options_.videoUUID)}

View file

@ -557,7 +557,8 @@ class WebTorrentPlugin extends Plugin {
private pickAverageVideoFile () { private pickAverageVideoFile () {
if (this.videoFiles.length === 1) return this.videoFiles[0] if (this.videoFiles.length === 1) return this.videoFiles[0]
return this.videoFiles[Math.floor(this.videoFiles.length / 2)] const files = this.videoFiles.filter(f => f.resolution.id !== 0)
return files[Math.floor(files.length / 2)]
} }
private stopTorrent (torrent: WebTorrent.Torrent) { private stopTorrent (torrent: WebTorrent.Torrent) {

View file

@ -12,6 +12,7 @@ $context-menu-width: 350px;
padding: 8px 0; padding: 8px 0;
border-radius: 4px; border-radius: 4px;
width: $context-menu-width; width: $context-menu-width;
z-index: 105; // On top of the progress bar
.vjs-menu-content { .vjs-menu-content {
opacity: $primary-foreground-opacity; opacity: $primary-foreground-opacity;

View file

@ -474,7 +474,7 @@ theme:
broadcast_message: broadcast_message:
enabled: false enabled: false
message: '' # Support markdown message: '' # Support markdown
level: 'info' # 'info' | 'warning' | 'error' level: 'info' # 'info' | 'warn' | 'error'
dismissable: false dismissable: false
search: search:

View file

@ -11,4 +11,4 @@ npm run clean:server:test
npm run concurrently -- -k -s first \ npm run concurrently -- -k -s first \
"cd client && npm run ng -- e2e --port 3333" \ "cd client && npm run ng -- e2e --port 3333" \
"NODE_ENV=test NODE_APP_INSTANCE=1 NODE_CONFIG='{ \"log\": { \"level\": \"warning\" }, \"signup\": { \"enabled\": false } }' node dist/server" "NODE_ENV=test NODE_APP_INSTANCE=1 NODE_CONFIG='{ \"log\": { \"level\": \"warn\" }, \"signup\": { \"enabled\": false } }' node dist/server"

View file

@ -12,4 +12,4 @@ npm run clean:server:test
npm run concurrently -- -k -s first \ npm run concurrently -- -k -s first \
"cd client && npm run ng -- e2e --port 3333 -c local" \ "cd client && npm run ng -- e2e --port 3333 -c local" \
"NODE_ENV=test NODE_APP_INSTANCE=1 NODE_CONFIG='{ \"log\": { \"level\": \"warning\" }, \"signup\": { \"enabled\": false } }' node dist/server" "NODE_ENV=test NODE_APP_INSTANCE=1 NODE_CONFIG='{ \"log\": { \"level\": \"warn\" }, \"signup\": { \"enabled\": false } }' node dist/server"

View file

@ -132,7 +132,7 @@ function checkConfig () {
// Broadcast message // Broadcast message
if (CONFIG.BROADCAST_MESSAGE.ENABLED) { if (CONFIG.BROADCAST_MESSAGE.ENABLED) {
const currentLevel = CONFIG.BROADCAST_MESSAGE.LEVEL const currentLevel = CONFIG.BROADCAST_MESSAGE.LEVEL
const available = [ 'info', 'warning', 'error' ] const available = [ 'info', 'warn', 'error' ]
if (available.includes(currentLevel) === false) { if (available.includes(currentLevel) === false) {
return 'Broadcast message level should be ' + available.join(' or ') + ' instead of ' + currentLevel return 'Broadcast message level should be ' + available.join(' or ') + ' instead of ' + currentLevel

View file

@ -62,7 +62,7 @@ storage:
client_overrides: '../data/client-overrides/' client_overrides: '../data/client-overrides/'
log: log:
level: 'info' # debug/info/warning/error level: 'info' # debug/info/warn/error
tracker: tracker:
enabled: true enabled: true