]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Merge branch 'release/3.2.0' into develop
authorChocobozzz <me@florianbigard.com>
Fri, 14 May 2021 12:18:13 +0000 (14:18 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 14 May 2021 12:18:13 +0000 (14:18 +0200)
client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html
client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.ts
client/src/assets/player/stats/stats-card.ts
client/src/assets/player/webtorrent/webtorrent-plugin.ts
client/src/sass/player/context-menu.scss
config/default.yaml
scripts/e2e/index.sh
scripts/e2e/local.sh
server/initializers/checker-after-init.ts
support/docker/production/config/production.yaml

index 84a793ae4ba387cf1c6ba4866408440466e8e5a2..b7fac176d9d1c02213b1a5cfda143d1ca8618156 100644 (file)
           <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>
index 8c12d3c4cd9ecd23d8c204a51e3285ec579a543f..08372d8ad04e2f1a499c6f41d88e0033e5cc93fe 100644 (file)
@@ -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}`
         })
   }
 
index d9f0d2fe9deab25051e0f8ffeb82a957d1672ee5..a93f595062ac98f6e4ccd5e108af2467a67fc282 100644 (file)
@@ -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) {
@@ -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)}
 
index 6f5fbe4c97bfd404c581d512bcce7567c9d3f93a..e27a163909375ebde924999737deb1c28e96ab61 100644 (file)
@@ -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) {
index 1738f486d263faf83421f5ccecf4f9e8c4cbcdd4..1653dd2c4ec8795fbbccb3afa482add4d0a42123 100644 (file)
@@ -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;
index 281cc0577955f41ed4db936949986ce9b15a0bfe..370a77925fd1a0859b8c334c9126e1d0f471bfdf 100644 (file)
@@ -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:
index 08f09c9ed1ea4da94fa32dbca05de0a2879e86d5..49d57f1df07e2497c13abc7949b17f1b69f29104 100755 (executable)
@@ -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"
index 0e74707d851d8fabc2c17e8569a311aec7be5747..469f2eb5e6d00a4a368fe4e47f124ece155c271d 100755 (executable)
@@ -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"
index 911734fa006c140657e0b3619b9a020b19744861..d75c0af04505d072c8dbc64165490090ccc3dde8 100644 (file)
@@ -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
index c97c3798759fe94f572c077abf8bd955598459ab..688f88eddd5d4676cbf098946578b28c543fe61b 100644 (file)
@@ -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