From 1a5b67b66d8327017d7763f4b2d54abd29c345de Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 14 May 2021 13:58:40 +0200 Subject: [PATCH 1/4] Fix http player defaulting to audio resolution --- client/src/assets/player/webtorrent/webtorrent-plugin.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 { 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) { From bc529ef7f0e18bef4cb43c0f2345e8fd1c0075ff Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 14 May 2021 14:00:00 +0200 Subject: [PATCH 2/4] Fix recommended banner size --- .../shared-actor-image-edit/actor-banner-edit.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { 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}` }) } From db0159c7f20633f9b472b77f5798849fdbdbe4b8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 14 May 2021 14:07:16 +0200 Subject: [PATCH 3/4] Fix "stats for nerds" card in HTTP mode --- client/src/assets/player/stats/stats-card.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 { 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)} From cb4bab61c19f2be7858f9cc6e8e234f04b1d504f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 14 May 2021 14:17:53 +0200 Subject: [PATCH 4/4] Fix logger warning level --- .../edit-custom-config/edit-basic-configuration.component.html | 2 +- client/src/sass/player/context-menu.scss | 1 + config/default.yaml | 2 +- scripts/e2e/index.sh | 2 +- scripts/e2e/local.sh | 2 +- server/initializers/checker-after-init.ts | 2 +- support/docker/production/config/production.yaml | 2 +- 7 files changed, 7 insertions(+), 6 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 @@
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; 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; 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: broadcast_message: enabled: false message: '' # Support markdown - level: 'info' # 'info' | 'warning' | 'error' + level: 'info' # 'info' | 'warn' | 'error' dismissable: false search: 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 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" 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 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" diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts index a93c8b7fd..5fd1af82f 100644 --- a/server/initializers/checker-after-init.ts +++ b/server/initializers/checker-after-init.ts @@ -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 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: client_overrides: '../data/client-overrides/' log: - level: 'info' # debug/info/warning/error + level: 'info' # debug/info/warn/error tracker: enabled: true