Skip to content

Commit

Permalink
Merge branch 'release/3.2.0' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobozzz committed May 14, 2021
2 parents aea0b0e + cb4bab6 commit 5b1a6d4
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<div class="peertube-select-container">
<select id="broadcastMessageLevel" formControlName="level" class="form-control">
<option value="info">info</option>
<option value="warning">warning</option>
<option value="warn">warning</option>
<option value="error">error</option>
</select>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class ActorBannerEditComponent implements OnInit {
this.bannerExtensions = config.banner.file.extensions.join(', ')

// 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}`
})
}

Expand Down
8 changes: 4 additions & 4 deletions client/src/assets/player/stats/stats-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ class StatsCard extends Component {
this.container.style.display = 'block'
this.updateInterval = setInterval(async () => {
try {
const options = this.mode === 'webtorrent'
? await this.buildWebTorrentOptions()
: await this.buildHLSOptions()
const options = this.mode === 'p2p-media-loader'
? await this.buildHLSOptions()
: await this.buildWebTorrentOptions() // Default

this.list.innerHTML = this.getListTemplate(options)
} catch (err) {
Expand Down Expand Up @@ -212,7 +212,7 @@ class StatsCard extends Component {
: undefined

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)}
Expand Down
3 changes: 2 additions & 1 deletion client/src/assets/player/webtorrent/webtorrent-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,8 @@ class WebTorrentPlugin extends Plugin {
private pickAverageVideoFile () {
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) {
Expand Down
1 change: 1 addition & 0 deletions client/src/sass/player/context-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ $context-menu-width: 350px;
padding: 8px 0;
border-radius: 4px;
width: $context-menu-width;
z-index: 105; // On top of the progress bar

.vjs-menu-content {
opacity: $primary-foreground-opacity;
Expand Down
2 changes: 1 addition & 1 deletion config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ theme:
broadcast_message:
enabled: false
message: '' # Support markdown
level: 'info' # 'info' | 'warning' | 'error'
level: 'info' # 'info' | 'warn' | 'error'
dismissable: false

search:
Expand Down
2 changes: 1 addition & 1 deletion scripts/e2e/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ npm run clean:server:test

npm run concurrently -- -k -s first \
"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"
2 changes: 1 addition & 1 deletion scripts/e2e/local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ npm run clean:server:test

npm run concurrently -- -k -s first \
"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"
2 changes: 1 addition & 1 deletion server/initializers/checker-after-init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function checkConfig () {
// Broadcast message
if (CONFIG.BROADCAST_MESSAGE.ENABLED) {
const currentLevel = CONFIG.BROADCAST_MESSAGE.LEVEL
const available = [ 'info', 'warning', 'error' ]
const available = [ 'info', 'warn', 'error' ]

if (available.includes(currentLevel) === false) {
return 'Broadcast message level should be ' + available.join(' or ') + ' instead of ' + currentLevel
Expand Down
2 changes: 1 addition & 1 deletion support/docker/production/config/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ storage:
client_overrides: '../data/client-overrides/'

log:
level: 'info' # debug/info/warning/error
level: 'info' # debug/info/warn/error

tracker:
enabled: true
Expand Down

0 comments on commit 5b1a6d4

Please sign in to comment.