aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md5
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss4
-rw-r--r--client/src/app/shared/shared-main/buttons/action-dropdown.component.html2
-rw-r--r--client/src/app/shared/shared-main/buttons/action-dropdown.component.scss12
-rw-r--r--engines.yaml5
-rw-r--r--server/controllers/bots.ts19
-rw-r--r--server/tests/api/notifications/moderation-notifications.ts2
-rw-r--r--server/tests/misc-endpoints.ts18
-rw-r--r--support/doc/dependencies.md13
9 files changed, 69 insertions, 11 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 64d3c9bdb..9f057c152 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,11 @@
2 2
3## v4.3.0 3## v4.3.0
4 4
5### IMPORTANT NOTES
6
7 * Redis **<** 5.x is not supported anymore
8 * FFmpeg **<** 4.3 is not supported anymore
9
5### Maintenance 10### Maintenance
6 11
7 * Use `yt-dlp` by default instead of `youtube-dl` for new installations (because of much more dev activity) 12 * Use `yt-dlp` by default instead of `youtube-dl` for new installations (because of much more dev activity)
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss
index 1bc9aebba..dda5d0b5e 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss
@@ -36,6 +36,10 @@ input[type=number] {
36 position: absolute; 36 position: absolute;
37 top: 0.2em; 37 top: 0.2em;
38 right: 2.5rem; 38 right: 2.5rem;
39
40 @media screen and (max-width: $mobile-view) {
41 display: none;
42 }
39 } 43 }
40 44
41 input[disabled] { 45 input[disabled] {
diff --git a/client/src/app/shared/shared-main/buttons/action-dropdown.component.html b/client/src/app/shared/shared-main/buttons/action-dropdown.component.html
index 017355bd0..37cf63fcd 100644
--- a/client/src/app/shared/shared-main/buttons/action-dropdown.component.html
+++ b/client/src/app/shared/shared-main/buttons/action-dropdown.component.html
@@ -18,7 +18,7 @@
18 <ng-template #templateActionLabel let-action> 18 <ng-template #templateActionLabel let-action>
19 <my-global-icon *ngIf="action.iconName" [iconName]="action.iconName" [ngClass]="'icon-' + action.iconName" aria-hidden="true"></my-global-icon> 19 <my-global-icon *ngIf="action.iconName" [iconName]="action.iconName" [ngClass]="'icon-' + action.iconName" aria-hidden="true"></my-global-icon>
20 20
21 <div class="d-flex flex-column"> 21 <div class="item-label">
22 <span i18n>{{ action.label }}</span> 22 <span i18n>{{ action.label }}</span>
23 <small class="muted" *ngIf="action.description">{{ action.description }}</small> 23 <small class="muted" *ngIf="action.description">{{ action.description }}</small>
24 </div> 24 </div>
diff --git a/client/src/app/shared/shared-main/buttons/action-dropdown.component.scss b/client/src/app/shared/shared-main/buttons/action-dropdown.component.scss
index fe65d6e7e..4c8a591aa 100644
--- a/client/src/app/shared/shared-main/buttons/action-dropdown.component.scss
+++ b/client/src/app/shared/shared-main/buttons/action-dropdown.component.scss
@@ -53,6 +53,8 @@
53} 53}
54 54
55.dropdown-menu { 55.dropdown-menu {
56 max-width: 75vw;
57
56 .dropdown-header { 58 .dropdown-header {
57 padding: 0.2rem 1rem; 59 padding: 0.2rem 1rem;
58 } 60 }
@@ -72,3 +74,13 @@
72 } 74 }
73 } 75 }
74} 76}
77
78.item-label {
79 display: flex;
80 flex-direction: column;
81 min-width: 1px;
82
83 > * {
84 @include ellipsis;
85 }
86}
diff --git a/engines.yaml b/engines.yaml
deleted file mode 100644
index 5a68ca4ba..000000000
--- a/engines.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
1node: ">=12.x"
2yarn: ">=1.x"
3postgres: ">=10.x"
4redis-server: ">=2.8.18"
5ffmpeg: ">=4.1"
diff --git a/server/controllers/bots.ts b/server/controllers/bots.ts
index 2a8d6863a..a5ce1d79f 100644
--- a/server/controllers/bots.ts
+++ b/server/controllers/bots.ts
@@ -1,7 +1,8 @@
1import { getServerActor } from '@server/models/application/application' 1import { getServerActor } from '@server/models/application/application'
2import { logger } from '@uploadx/core'
2import express from 'express' 3import express from 'express'
3import { truncate } from 'lodash' 4import { truncate } from 'lodash'
4import { SitemapStream, streamToPromise } from 'sitemap' 5import { SitemapStream, streamToPromise, ErrorLevel } from 'sitemap'
5import { buildNSFWFilter } from '../helpers/express-utils' 6import { buildNSFWFilter } from '../helpers/express-utils'
6import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../initializers/constants' 7import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../initializers/constants'
7import { asyncMiddleware } from '../middlewares' 8import { asyncMiddleware } from '../middlewares'
@@ -34,7 +35,18 @@ async function getSitemap (req: express.Request, res: express.Response) {
34 urls = urls.concat(await getSitemapVideoChannelUrls()) 35 urls = urls.concat(await getSitemapVideoChannelUrls())
35 urls = urls.concat(await getSitemapAccountUrls()) 36 urls = urls.concat(await getSitemapAccountUrls())
36 37
37 const sitemapStream = new SitemapStream({ hostname: WEBSERVER.URL }) 38 const sitemapStream = new SitemapStream({
39 hostname: WEBSERVER.URL,
40 errorHandler: (err: Error, level: ErrorLevel) => {
41 if (level === 'warn') {
42 logger.warn('Warning in sitemap generation.', { err })
43 } else if (level === 'throw') {
44 logger.error('Error in sitemap generation.', { err })
45
46 throw err
47 }
48 }
49 })
38 50
39 for (const urlObj of urls) { 51 for (const urlObj of urls) {
40 sitemapStream.write(urlObj) 52 sitemapStream.write(urlObj)
@@ -83,7 +95,8 @@ async function getSitemapLocalVideoUrls () {
83 url: WEBSERVER.URL + v.getWatchStaticPath(), 95 url: WEBSERVER.URL + v.getWatchStaticPath(),
84 video: [ 96 video: [
85 { 97 {
86 title: v.name, 98 // Sitemap title should be < 100 characters
99 title: truncate(v.name, { length: 100, omission: '...' }),
87 // Sitemap description should be < 2000 characters 100 // Sitemap description should be < 2000 characters
88 description: truncate(v.description || v.name, { length: 2000, omission: '...' }), 101 description: truncate(v.description || v.name, { length: 2000, omission: '...' }),
89 player_loc: WEBSERVER.URL + v.getEmbedStaticPath(), 102 player_loc: WEBSERVER.URL + v.getEmbedStaticPath(),
diff --git a/server/tests/api/notifications/moderation-notifications.ts b/server/tests/api/notifications/moderation-notifications.ts
index da9bd1196..fc953f144 100644
--- a/server/tests/api/notifications/moderation-notifications.ts
+++ b/server/tests/api/notifications/moderation-notifications.ts
@@ -601,7 +601,7 @@ describe('Test moderation notifications', function () {
601 }) 601 })
602 602
603 it('Should not send a notification to moderators on new video without auto-blacklist', async function () { 603 it('Should not send a notification to moderators on new video without auto-blacklist', async function () {
604 this.timeout(60000) 604 this.timeout(120000)
605 605
606 const name = 'video without auto-blacklist ' + buildUUID() 606 const name = 'video without auto-blacklist ' + buildUUID()
607 607
diff --git a/server/tests/misc-endpoints.ts b/server/tests/misc-endpoints.ts
index 9e404b549..663ac044a 100644
--- a/server/tests/misc-endpoints.ts
+++ b/server/tests/misc-endpoints.ts
@@ -3,6 +3,7 @@
3import { expect } from 'chai' 3import { expect } from 'chai'
4import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' 4import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
5import { HttpStatusCode, VideoPrivacy } from '@shared/models' 5import { HttpStatusCode, VideoPrivacy } from '@shared/models'
6import { expectLogDoesNotContain } from './shared'
6 7
7describe('Test misc endpoints', function () { 8describe('Test misc endpoints', function () {
8 let server: PeerTubeServer 9 let server: PeerTubeServer
@@ -183,6 +184,23 @@ describe('Test misc endpoints', function () {
183 expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/accounts/user1</loc></url>') 184 expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/accounts/user1</loc></url>')
184 expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/accounts/user2</loc></url>') 185 expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/accounts/user2</loc></url>')
185 }) 186 })
187
188 it('Should not fail with big title/description videos', async function () {
189 const name = 'v'.repeat(115)
190
191 await server.videos.upload({ attributes: { name, description: 'd'.repeat(2500), nsfw: false } })
192
193 const res = await makeGetRequest({
194 url: server.url,
195 path: '/sitemap.xml?t=2', // avoid using cache
196 expectedStatus: HttpStatusCode.OK_200
197 })
198
199 await expectLogDoesNotContain(server, 'Warning in sitemap generation')
200 await expectLogDoesNotContain(server, 'Error in sitemap generation')
201
202 expect(res.text).to.contain(`<video:title>${'v'.repeat(97)}...</video:title>`)
203 })
186 }) 204 })
187 205
188 after(async function () { 206 after(async function () {
diff --git a/support/doc/dependencies.md b/support/doc/dependencies.md
index adce70c97..bf53b8080 100644
--- a/support/doc/dependencies.md
+++ b/support/doc/dependencies.md
@@ -2,7 +2,16 @@
2 2
3:warning: **Warning**: dependencies guide is maintained by the community. Some parts may be outdated! :warning: 3:warning: **Warning**: dependencies guide is maintained by the community. Some parts may be outdated! :warning:
4 4
5Follow the below guides, and check their versions match [required external dependencies versions](https://github.com/Chocobozzz/PeerTube/blob/master/engines.yaml). You can check them automatically via `sudo npx engineslist`. 5Follow the below guides, and check their versions match [required external dependencies versions](https://github.com/Chocobozzz/PeerTube/blob/master/engines.yaml).
6
7Main dependencies version supported by PeerTube:
8
9 * `node` >=14.x
10 * `yarn` >=1.x
11 * `postgres` >=10.x
12 * `redis-server` >=5.x
13 * `ffmpeg` >=4.3
14
6 15
7_note_: only **LTS** versions of external dependencies are supported. If no LTS version matching the version constraint is available, only **release** versions are supported. 16_note_: only **LTS** versions of external dependencies are supported. If no LTS version matching the version constraint is available, only **release** versions are supported.
8 17
@@ -64,6 +73,7 @@ sudo apt update
64sudo apt install certbot nginx ffmpeg postgresql postgresql-contrib openssl g++ make redis-server git cron wget 73sudo apt install certbot nginx ffmpeg postgresql postgresql-contrib openssl g++ make redis-server git cron wget
65ffmpeg -version # Should be >= 4.1 74ffmpeg -version # Should be >= 4.1
66g++ -v # Should be >= 5.x 75g++ -v # Should be >= 5.x
76redis-server --version # Should be >= 5.x
67``` 77```
68 78
69Now that dependencies are installed, before running PeerTube you should start PostgreSQL and Redis: 79Now that dependencies are installed, before running PeerTube you should start PostgreSQL and Redis:
@@ -263,6 +273,7 @@ This is necessary because `ffmpeg` is not in the Fedora repos.
263sudo dnf install nginx ffmpeg postgresql-server postgresql-contrib openssl gcc-c++ make redis git vim 273sudo dnf install nginx ffmpeg postgresql-server postgresql-contrib openssl gcc-c++ make redis git vim
264ffmpeg -version # Should be >= 4.1 274ffmpeg -version # Should be >= 4.1
265g++ -v # Should be >= 5.x 275g++ -v # Should be >= 5.x
276redis-server --version # Should be >= 5.x
266``` 277```
267 278
2688. Configure nginx 2798. Configure nginx