* 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]>
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)
* 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]>
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]>
plugins install copies the plugin directory into the instance storage
(pnpm add file:), so rebuilding the source does not change what the
instance runs and re-running install reinstalls the same copy.
Point at plugins update --path and the required version bump, and link
the CLI tools guide from the plugin development section.
* 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]>
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)
Introduce a new endpoint `/api/v1/videos/{id}/comments/{commentId}/replies` to load more replies of a specific comment
Introduce new server hooks for this endpoint: `filter:api.video-comment-replies.list.params` and `filter:api.video-comment-replies.list.result`
Introduce new client hooks when loading more comment replies: `filter:api.video-watch.video-comment-replies.list.params` and `filter:api.video-watch.video-comment-replies.list.result`
A modal is displayed when comment depth is too high, to prevent width
overflow
* feat: use PostgreSQL FTS for video search instead of trigram
Add a videoSearch table with tsvector column and GIN index to store
search vectors for video titles and descriptions. Titles are weighted
higher than descriptions via setweight (A/B).
Trigram search is kept as a fallback to handle typos.
A migration script (server/scripts/migrations/peertube-8.2.ts) is
provided to backfill existing videos.
See #7386
* fix: add missing VideoSearchModel
search indexes did not appear in the database when migrating
* Improve FTS
* Requires PG >= 14
---------
Co-authored-by: oliwierjaszczyszyn <h@h>
Co-authored-by: Chocobozzz <[email protected]>
* feat(disable-video-embed): add ability to disable video embed
Add DISABLED value to the embed privacy policy enum, allowing owners
to fully block embedding instead of only restricting it to allowed domains.
* Styling
* Update doc
---------
Co-authored-by: Chocobozzz <[email protected]>