aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-14 14:18:13 +0200
committerChocobozzz <me@florianbigard.com>2021-05-14 14:18:13 +0200
commit5b1a6d45b5d6e50102e1c7c8c845401b76b11b4d (patch)
treef4d7f184593e6e025b71cbe7cb4ea8583fd267b0
parentaea0b0e7cde7495e60fe07b4444067f53d35ce3f (diff)
parentcb4bab61c19f2be7858f9cc6e8e234f04b1d504f (diff)
downloadPeerTube-5b1a6d45b5d6e50102e1c7c8c845401b76b11b4d.tar.gz
PeerTube-5b1a6d45b5d6e50102e1c7c8c845401b76b11b4d.tar.zst
PeerTube-5b1a6d45b5d6e50102e1c7c8c845401b76b11b4d.zip
Merge branch 'release/3.2.0' into develop
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html2
-rw-r--r--client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.ts2
-rw-r--r--client/src/assets/player/stats/stats-card.ts8
-rw-r--r--client/src/assets/player/webtorrent/webtorrent-plugin.ts3
-rw-r--r--client/src/sass/player/context-menu.scss1
-rw-r--r--config/default.yaml2
-rwxr-xr-xscripts/e2e/index.sh2
-rwxr-xr-xscripts/e2e/local.sh2
-rw-r--r--server/initializers/checker-after-init.ts2
-rw-r--r--support/docker/production/config/production.yaml2
10 files changed, 14 insertions, 12 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html
index 84a793ae4..b7fac176d 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html
+++ b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html
@@ -100,7 +100,7 @@
100 <div class="peertube-select-container"> 100 <div class="peertube-select-container">
101 <select id="broadcastMessageLevel" formControlName="level" class="form-control"> 101 <select id="broadcastMessageLevel" formControlName="level" class="form-control">
102 <option value="info">info</option> 102 <option value="info">info</option>
103 <option value="warning">warning</option> 103 <option value="warn">warning</option>
104 <option value="error">error</option> 104 <option value="error">error</option>
105 </select> 105 </select>
106 </div> 106 </div>
diff --git a/client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.ts b/client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.ts
index 8c12d3c4c..08372d8ad 100644
--- a/client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.ts
+++ b/client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.ts
@@ -42,7 +42,7 @@ export class ActorBannerEditComponent implements OnInit {
42 this.bannerExtensions = config.banner.file.extensions.join(', ') 42 this.bannerExtensions = config.banner.file.extensions.join(', ')
43 43
44 // tslint:disable:max-line-length 44 // tslint:disable:max-line-length
45 this.bannerFormat = $localize`ratio 6/1, recommended size: 1600x266, max size: ${getBytes(this.maxBannerSize)}, extensions: ${this.bannerExtensions}` 45 this.bannerFormat = $localize`ratio 6/1, recommended size: 1920x317, max size: ${getBytes(this.maxBannerSize)}, extensions: ${this.bannerExtensions}`
46 }) 46 })
47 } 47 }
48 48
diff --git a/client/src/assets/player/stats/stats-card.ts b/client/src/assets/player/stats/stats-card.ts
index d9f0d2fe9..a93f59506 100644
--- a/client/src/assets/player/stats/stats-card.ts
+++ b/client/src/assets/player/stats/stats-card.ts
@@ -89,9 +89,9 @@ class StatsCard extends Component {
89 this.container.style.display = 'block' 89 this.container.style.display = 'block'
90 this.updateInterval = setInterval(async () => { 90 this.updateInterval = setInterval(async () => {
91 try { 91 try {
92 const options = this.mode === 'webtorrent' 92 const options = this.mode === 'p2p-media-loader'
93 ? await this.buildWebTorrentOptions() 93 ? await this.buildHLSOptions()
94 : await this.buildHLSOptions() 94 : await this.buildWebTorrentOptions() // Default
95 95
96 this.list.innerHTML = this.getListTemplate(options) 96 this.list.innerHTML = this.getListTemplate(options)
97 } catch (err) { 97 } catch (err) {
@@ -212,7 +212,7 @@ class StatsCard extends Component {
212 : undefined 212 : undefined
213 213
214 return ` 214 return `
215 ${this.buildElement(player.localize('Player mode'), this.options_.mode)} 215 ${this.buildElement(player.localize('Player mode'), this.mode || 'HTTP')}
216 216
217 ${this.buildElement(player.localize('Video UUID'), this.options_.videoUUID)} 217 ${this.buildElement(player.localize('Video UUID'), this.options_.videoUUID)}
218 218
diff --git a/client/src/assets/player/webtorrent/webtorrent-plugin.ts b/client/src/assets/player/webtorrent/webtorrent-plugin.ts
index 6f5fbe4c9..e27a16390 100644
--- a/client/src/assets/player/webtorrent/webtorrent-plugin.ts
+++ b/client/src/assets/player/webtorrent/webtorrent-plugin.ts
@@ -557,7 +557,8 @@ class WebTorrentPlugin extends Plugin {
557 private pickAverageVideoFile () { 557 private pickAverageVideoFile () {
558 if (this.videoFiles.length === 1) return this.videoFiles[0] 558 if (this.videoFiles.length === 1) return this.videoFiles[0]
559 559
560 return this.videoFiles[Math.floor(this.videoFiles.length / 2)] 560 const files = this.videoFiles.filter(f => f.resolution.id !== 0)
561 return files[Math.floor(files.length / 2)]
561 } 562 }
562 563
563 private stopTorrent (torrent: WebTorrent.Torrent) { 564 private stopTorrent (torrent: WebTorrent.Torrent) {
diff --git a/client/src/sass/player/context-menu.scss b/client/src/sass/player/context-menu.scss
index 1738f486d..1653dd2c4 100644
--- a/client/src/sass/player/context-menu.scss
+++ b/client/src/sass/player/context-menu.scss
@@ -12,6 +12,7 @@ $context-menu-width: 350px;
12 padding: 8px 0; 12 padding: 8px 0;
13 border-radius: 4px; 13 border-radius: 4px;
14 width: $context-menu-width; 14 width: $context-menu-width;
15 z-index: 105; // On top of the progress bar
15 16
16 .vjs-menu-content { 17 .vjs-menu-content {
17 opacity: $primary-foreground-opacity; 18 opacity: $primary-foreground-opacity;
diff --git a/config/default.yaml b/config/default.yaml
index 281cc0577..370a77925 100644
--- a/config/default.yaml
+++ b/config/default.yaml
@@ -474,7 +474,7 @@ theme:
474broadcast_message: 474broadcast_message:
475 enabled: false 475 enabled: false
476 message: '' # Support markdown 476 message: '' # Support markdown
477 level: 'info' # 'info' | 'warning' | 'error' 477 level: 'info' # 'info' | 'warn' | 'error'
478 dismissable: false 478 dismissable: false
479 479
480search: 480search:
diff --git a/scripts/e2e/index.sh b/scripts/e2e/index.sh
index 08f09c9ed..49d57f1df 100755
--- a/scripts/e2e/index.sh
+++ b/scripts/e2e/index.sh
@@ -11,4 +11,4 @@ npm run clean:server:test
11 11
12npm run concurrently -- -k -s first \ 12npm run concurrently -- -k -s first \
13 "cd client && npm run ng -- e2e --port 3333" \ 13 "cd client && npm run ng -- e2e --port 3333" \
14 "NODE_ENV=test NODE_APP_INSTANCE=1 NODE_CONFIG='{ \"log\": { \"level\": \"warning\" }, \"signup\": { \"enabled\": false } }' node dist/server" 14 "NODE_ENV=test NODE_APP_INSTANCE=1 NODE_CONFIG='{ \"log\": { \"level\": \"warn\" }, \"signup\": { \"enabled\": false } }' node dist/server"
diff --git a/scripts/e2e/local.sh b/scripts/e2e/local.sh
index 0e74707d8..469f2eb5e 100755
--- a/scripts/e2e/local.sh
+++ b/scripts/e2e/local.sh
@@ -12,4 +12,4 @@ npm run clean:server:test
12 12
13npm run concurrently -- -k -s first \ 13npm run concurrently -- -k -s first \
14 "cd client && npm run ng -- e2e --port 3333 -c local" \ 14 "cd client && npm run ng -- e2e --port 3333 -c local" \
15 "NODE_ENV=test NODE_APP_INSTANCE=1 NODE_CONFIG='{ \"log\": { \"level\": \"warning\" }, \"signup\": { \"enabled\": false } }' node dist/server" 15 "NODE_ENV=test NODE_APP_INSTANCE=1 NODE_CONFIG='{ \"log\": { \"level\": \"warn\" }, \"signup\": { \"enabled\": false } }' node dist/server"
diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts
index 911734fa0..d75c0af04 100644
--- a/server/initializers/checker-after-init.ts
+++ b/server/initializers/checker-after-init.ts
@@ -132,7 +132,7 @@ function checkConfig () {
132 // Broadcast message 132 // Broadcast message
133 if (CONFIG.BROADCAST_MESSAGE.ENABLED) { 133 if (CONFIG.BROADCAST_MESSAGE.ENABLED) {
134 const currentLevel = CONFIG.BROADCAST_MESSAGE.LEVEL 134 const currentLevel = CONFIG.BROADCAST_MESSAGE.LEVEL
135 const available = [ 'info', 'warning', 'error' ] 135 const available = [ 'info', 'warn', 'error' ]
136 136
137 if (available.includes(currentLevel) === false) { 137 if (available.includes(currentLevel) === false) {
138 return 'Broadcast message level should be ' + available.join(' or ') + ' instead of ' + currentLevel 138 return 'Broadcast message level should be ' + available.join(' or ') + ' instead of ' + currentLevel
diff --git a/support/docker/production/config/production.yaml b/support/docker/production/config/production.yaml
index c97c37987..688f88edd 100644
--- a/support/docker/production/config/production.yaml
+++ b/support/docker/production/config/production.yaml
@@ -62,7 +62,7 @@ storage:
62 client_overrides: '../data/client-overrides/' 62 client_overrides: '../data/client-overrides/'
63 63
64log: 64log:
65 level: 'info' # debug/info/warning/error 65 level: 'info' # debug/info/warn/error
66 66
67tracker: 67tracker:
68 enabled: true 68 enabled: true