840 Commits
Author SHA1 Message Date
Chocobozzz 5a50e33d81 Optimize CI 2026-10-28 11:11:36 +01:00
ImmaeandChocobozzz 4fd6af36e4 Recommendations policy (#7633)
* Filter recommendation policy

This commit adds a new option attached to a video, that allows to chose
which kind of recommendation will appear below it in the viewer.
It currently allows four setups:
- Any video (same as currently)
- Local videos only
- Owner videos only
- Same channel videos only

This allows the user who owns the video to restrict the recommendations
associated to his videos.

* Remove old recommendation strategy endpoints

* Add tests

Tests for the recommendation feature

* Add a stateless /api/v1/recommendations/videos route

The route accepts a strategy and (optionnally) video ID as query params,
and returns a list of recommentations associated to the video and
matching the strategy

* Add stateless recommendation endpoint: client part

* Add an admin-configurable default strategy

* Add Federation recommendation strategy information

* User import/export settings

* Translate changes to French

* Use scope instead of strategy for recommendations

---------

Co-authored-by: Chocobozzz <[email protected]>
2026-10-28 08:41:59 +01:00
Chocobozzz b0f0eab1c8 Fix edition with latest ffmpeg versions 2026-10-27 16:40:30 +01:00
Chocobozzz 28a28cb030 Improve SEO 2026-10-27 16:01:04 +01:00
Chocobozzz 32fb087261 Fix ci 2026-10-27 15:06:43 +01:00
Chocobozzz 57b5e4110f Add secondaries information to debug endpoint 2026-10-27 13:16:06 +01:00
Chocobozzz 0108fcb93f Store audit logs in database
Allow to centralize audit logs, even if horizontal scalability is
enabled
2026-10-27 11:16:03 +01:00
Chocobozzz ad17731e3f More robust SSRF protection 2026-10-27 11:15:49 +01:00
Chocobozzz 908f0a9d9c Fix desync audio for live replay 2026-10-27 08:44:33 +01:00
Chocobozzz 970a3eb39b Limit resource usage when generating thumbnails 2026-10-26 16:53:25 +01:00
EmilienLDN 42348bff39 Fix audio download with a webp thumbnail
The thumbnail added as cover of audio only downloads was copied as is
in the MP4 container, which doesn't support webp images.
Convert the cover to JPEG instead.

Fixes #7806
2026-10-26 16:53:13 +01:00
Chocobozzz e51ba6976f Fix podcast:medium 2026-10-26 16:53:08 +01:00
Chocobozzz 5cd512cf0a Check AP redirected URLs 2026-10-26 16:53:08 +01:00
Chocobozzz 4d049a4897 Bump sharp and block not supported formats 2026-10-26 16:53:07 +01:00
Chocobozzz bf8eb1c8d9 Fix CI 2026-10-26 16:52:44 +01:00
Chocobozzz 03554d3319 Ensure we only store 1 frame 2026-10-26 16:52:44 +01:00
David Larochette ee39c766f9 fix(tests): skip Akismet plugin test when AKISMET_KEY is absent
The external-plugins suite is gated to run only on the schedule event
(test.yml), so it never executes on push/PR builds. But GitHub Actions
schedule triggers are evaluated from each repository's own default
branch — including forks. Any fork that enables the Test workflow (e.g.
to get CI on a feature branch) inherits this schedule trigger too, and
every such run hits this test, which hard-fails because AKISMET_KEY is
a repository secret that is never copied to forks.

Skip the suite instead of throwing when the key is missing, the same
way other environment-dependent tests in this codebase already do
(see packages/tests/src/server-helpers/ffmpeg-stereo3d.ts). The
upstream repo still runs the real Akismet checks every night since its
own secret is present; only environments without the key now report
the suite as skipped instead of failing the build.

Assisted-by: Claude Sonnet via Claude Code
2026-10-26 11:18:17 +01:00
EmilienLDN 1850fd4927 Fix audio download with a webp thumbnail
The thumbnail added as cover of audio only downloads was copied as is
in the MP4 container, which doesn't support webp images.
Convert the cover to JPEG instead.

Fixes #7806
2026-10-26 10:48:28 +01:00
Chocobozzz f780e64289 Introduce postgresql secondaries support
Only for a few routes, that consumes postgresql CPU

Re-implement sequelize connection routing mechanism, to support:
 * Replica lag monitoring (to not select replicas that are too far
   behind the primary)
 * Be opt-in instead of opt-out (primary is used by default, a context
   must be marked to use replicas)
 * Handle "read-you-writes" mechanism (ensure that reads after writes
   see the latest data, using the user ID to track recent writes)
2026-10-16 13:47:57 +02:00
kontrollantenandChocobozzz 5a497906d7 feat(videos/browse): make it configurable to show scheduled lives (#7825)
* feat(videos/browse): make it configurable to show scheduled lives

closes #5235

* Consistency

---------

Co-authored-by: Chocobozzz <[email protected]>
2026-10-15 10:47:12 +02:00
Sourav SarkarandChocobozzz 172d446209 initial commit for filters (#7802)
* initial commit for filters

* lint fix

* lint update .5 -> 0.5

* Use same behaviour as user video language settings

* Reorganize content filters and settings

---------

Co-authored-by: Chocobozzz <[email protected]>
2026-10-15 10:30:07 +02:00
Chocobozzz 38ac38332b Add plugin helper to delete a user 2026-10-14 10:31:42 +02:00
Chocobozzz 327f669730 Keep channel sync order even on import retry 2026-10-14 09:17:16 +02:00
CristianandChocobozzz 49caff058d Constrain PyAV when installing whisper-ctranslate2 (#7815)
* Constrain PyAV when installing whisper-ctranslate2

PyAV 19 (2026-09-29, Python 3.12+) removed the metadata_errors argument of
av.open(). faster-whisper 1.2.1, which whisper-ctranslate2 0.4.4 installs,
still passes it, so a freshly auto-installed engine fails every
transcription and no transcript file is written.

* Prefer upgrading to latest whisper ctranslate

---------

Co-authored-by: Chocobozzz <[email protected]>
2026-10-13 16:48:42 +02:00
Daniel RamosandChocobozzz 341818e2ed Keep the 3D packing of videos that declare it in their container (#7816)
* Keep the 3D packing of videos that declare it in their container

A video with the packing declared in its container lost it in the web video and HLS files: the copy path writes an MP4 without it (seen with Matroska's StereoMode; the check reads the stream's stereo side data, so MP4's st3d box goes the same way), and libx264 only writes the frame packing SEI for the left eye first, as FFmpeg tells it "Inverted mode is not supported by x264".

Do not copy such a video, so that libx264 writes the SEI from the packing of the input, and when the right eye comes first put the left eye first with the stereo3d filter and give the packing to libx264 as frame-packing (the frames keep the inverted side data otherwise, and libx264 would drop the packing again).

Assisted-by: Claude Sonnet via Claude Code

* Handle rotation and move 3d to transcoding profile

---------

Co-authored-by: Chocobozzz <[email protected]>
2026-10-13 16:09:28 +02:00
kontrollantenandChocobozzz a17b7698d9 feat: add support for playlistId in peertube-videos-list element (#7822)
* feat: add support for playlistId in peertube-videos-list element

closes #5391

* Throw on param conflict and hide nsfw videos

---------

Co-authored-by: Chocobozzz <[email protected]>
2026-10-13 14:02:40 +02:00
9ff61e9f4e Display configured count_view_after in video stats views help (#7821)
* Display configured count_view_after in video stats views help

* Fix doc

---------

Co-authored-by: baptiste-bcn <[email protected]>
Co-authored-by: Chocobozzz <[email protected]>
2026-10-13 13:49:06 +02:00
Chocobozzz 4384b9fae6 Add isLocal filter to comments feeds 2026-10-13 12:01:52 +02:00
Thomas Citharel f9d1dc3318 feat: allow filtering comments feed on local videos
Add an `onLocalVideo` query parameter to the video comments feed to
only list comments made on local (or remote) videos.

Signed-off-by: Thomas Citharel <[email protected]>
2026-10-13 12:01:52 +02:00
Chocobozzz 6acc565b6f Fix broken local path update 2026-10-13 11:30:02 +02:00
AltaifiandChocobozzz e911c75b6b Add ability to disable audit logs (#7777)
* Add ability to disable audit logs

Add a `log.audit.enabled` configuration option, mirroring the existing
`log.rotation.enabled` shape.

The guard lives in `auditLoggerWrapper`, which every `create`/`update`/
`delete` audit call routes through, so the 13 `auditLoggerFactory`
consumers need no change.

Closes #2686

* Add sort option to channel miniature markup

* Styling

---------

Co-authored-by: Chocobozzz <[email protected]>
2026-10-13 11:11:34 +02:00
Sourav Sarkar 129b14a816 Enabled 2fa for LDAP users (#7773) 2026-10-13 10:57:07 +02:00
kontrollantenandChocobozzz 3d5b0f1148 feat: add support for plugins to disable account description (#7769)
* feat: add support for plugins to hide account description

closes #7768

* feat: add plugin selector to username description

* use myPluginSelector for selectors

* harmonize plugin selector names

* Fixes

---------

Co-authored-by: Chocobozzz <[email protected]>
2026-10-12 16:02:34 +02:00
Chocobozzz 4757d06d92 Fix CI 2026-10-12 10:39:08 +02:00
Chocobozzz d384412981 Fix sequelize transaction inconsistency 2026-10-12 09:59:06 +02:00
Chocobozzz 1e0a0fd953 Improve scalability with many requests 2026-10-06 16:23:10 +02:00
Chocobozzz f0b041375b Fix tests 2026-10-06 09:02:22 +02:00
Chocobozzz 42cb7718bf Improve performance
Try to bypass Redis when we can to lower performance penalty of
horizontal scalability added recently
2026-10-05 13:43:08 +02:00
Chocobozzz 46cbbd487c Best effort for keeping order in AP
Lock objects when receiving activities, and use a global concurrency of
1 when sending them
2026-10-05 13:43:08 +02:00
Chocobozzz dbb44f0015 Add ability to specify remote tracker
To handle large amount of viewers using P2P
2026-10-05 13:43:05 +02:00
Chocobozzz 44f27cb2db Inbox processing support in secondaries
Also support redundancy in object storage
2026-10-05 13:42:44 +02:00
Chocobozzz 86bf7f4f42 Make secondary processes rely on object storage
Simplifications:
  * object_storage.enabled is now the only switch, and check at startup
    bucket connection
  * secondaries no longer adopt the storage directories of the primary

Add remote files caching in a dedicated bucket so secondaries can lazy
static serve them

Publish the youtube-dl cookies file through Redis to support it in
secondaries

Change nginx behaviour using an denylist to secondaries (instead of an
allowlist)
2026-10-05 13:42:42 +02:00
Chocobozzz ca9c9a313b Refactor redis subscription channels 2026-10-05 13:41:13 +02:00
Chocobozzz c75dba70cd Select which job queue to stop/resume 2026-10-05 13:41:13 +02:00
Chocobozzz 41effc40ce Stage heavy uploads in object storage
Required step so secondary can handle file upload endpoints and handle
controllers that manage files
2026-10-05 13:41:13 +02:00
Chocobozzz aa140860ef Support more endpoints to secondary
Use distributed locks and shared files manager so secondaries can handle
more endpoints
2026-10-05 13:41:13 +02:00
Chocobozzz d18b78dd43 Add more API write endpoints support to secondary 2026-10-05 13:41:13 +02:00
Chocobozzz 65cd6ce6cc Fix tests 2026-10-05 13:41:13 +02:00
Chocobozzz 31b3bd74d4 Reduce log noise 2026-10-05 13:41:13 +02:00
Chocobozzz fa856f7dc7 Add video files lifecycle management 2026-10-05 13:41:12 +02:00