Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Completely remove best default trending algorithm

Chocobozzz010382b6037c
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f3724a3bfa..8aeeb7b7e4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,7 @@
* Add `client.videos.resumable_upload.max_chunk_size` config option [#4857](https://github.com/Chocobozzz/PeerTube/pull/4857)
* Add `object_storage.upload_acl` config option [#4861](https://github.com/Chocobozzz/PeerTube/pull/4861)
* Add ability to set RTMP/RTMPS listening hostname using `rtmp.hostname`/`rtmps.hostname` and public RTMP/RTMPS hostname using `rtmp.public_hostname`/`rtmps.public_hostname`
+ * Removed `best` default trending algorithm. It is automatically used if using `hot` algorithm with a logged in user
### Docker
diff --git a/client/src/app/+videos/video-list/videos-list-common-page.component.ts b/client/src/app/+videos/video-list/videos-list-common-page.component.ts
index 72c7e1ef69..d2782036b3 100644
--- a/client/src/app/+videos/video-list/videos-list-common-page.component.ts
+++ b/client/src/app/+videos/video-list/videos-list-common-page.component.ts
@@ -173,6 +173,10 @@ export class VideosListCommonPageComponent implements OnInit, OnDestroy, Disable
case 'most-liked':
return '-likes'
+ // We'll automatically apply "best" sort if using "hot" sort with a logged user
+ case 'best':
+ return '-hot'
+
default:
return '-' + algorithm as VideoSortField
}
diff --git a/config/default.yaml b/config/default.yaml
index 689f81343d..54452d5e26 100644
--- a/config/default.yaml
+++ b/config/default.yaml
@@ -181,7 +181,6 @@ trending:
interval_days: 7 # Compute trending videos for the last x days
algorithms:
enabled:
- - 'best' # adaptation of Reddit's 'Best' algorithm (Hot minus History)
- 'hot' # adaptation of Reddit's 'Hot' algorithm
- 'most-viewed' # default, used initially by PeerTube as the trending page
- 'most-liked'
diff --git a/config/production.yaml.example b/config/production.yaml.example
index 6db43fccf7..89b7fe9662 100644
--- a/config/production.yaml.example
+++ b/config/production.yaml.example
@@ -177,7 +177,6 @@ trending:
interval_days: 7 # Compute trending videos for the last x days
algorithms:
enabled:
- - 'best' # adaptation of Reddit's 'Best' algorithm (Hot minus History)
- 'hot' # adaptation of Reddit's 'Hot' algorithm
- 'most-viewed' # default, used initially by PeerTube as the trending page
- 'most-liked'
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts
index c8dbbf797c..99fb24a5b3 100644
--- a/server/tests/api/check-params/config.ts
+++ b/server/tests/api/check-params/config.ts
@@ -165,7 +165,7 @@ describe('Test config API validators', function () {
trending: {
videos: {
algorithms: {
- enabled: [ 'best', 'hot', 'most-viewed', 'most-liked' ],
+ enabled: [ 'hot', 'most-viewed', 'most-liked' ],
default: 'most-viewed'
}
}
diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts
index f31012a5c4..0f2fb5493c 100644
--- a/server/tests/api/server/config.ts
+++ b/server/tests/api/server/config.ts
@@ -367,7 +367,7 @@ const newCustomConfig: CustomConfig = {
trending: {
videos: {
algorithms: {
- enabled: [ 'best', 'hot', 'most-viewed', 'most-liked' ],
+ enabled: [ 'hot', 'most-viewed', 'most-liked' ],
default: 'hot'
}
}
diff --git a/shared/server-commands/server/config-command.ts b/shared/server-commands/server/config-command.ts
index ed4961bc3f..5320dead47 100644
--- a/shared/server-commands/server/config-command.ts
+++ b/shared/server-commands/server/config-command.ts
@@ -356,7 +356,7 @@ export class ConfigCommand extends AbstractCommand {
trending: {
videos: {
algorithms: {
- enabled: [ 'best', 'hot', 'most-viewed', 'most-liked' ],
+ enabled: [ 'hot', 'most-viewed', 'most-liked' ],
default: 'hot'
}
}