diff options
author | Chocobozzz <me@florianbigard.com> | 2022-06-03 14:04:52 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-03 14:04:52 +0200 |
commit | 010382b6037cff5d0ed16fa8b158691439fac9b7 (patch) | |
tree | d1c7fd25525fb1d87f3f9b851c5dcbc772cf6720 | |
parent | c8fdfab0e36cc7324c61710009bf334e836485d9 (diff) | |
download | PeerTube-010382b6037cff5d0ed16fa8b158691439fac9b7.tar.gz PeerTube-010382b6037cff5d0ed16fa8b158691439fac9b7.tar.zst PeerTube-010382b6037cff5d0ed16fa8b158691439fac9b7.zip |
Completely remove best default trending algorithm
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | client/src/app/+videos/video-list/videos-list-common-page.component.ts | 4 | ||||
-rw-r--r-- | config/default.yaml | 1 | ||||
-rw-r--r-- | config/production.yaml.example | 1 | ||||
-rw-r--r-- | server/tests/api/check-params/config.ts | 2 | ||||
-rw-r--r-- | server/tests/api/server/config.ts | 2 | ||||
-rw-r--r-- | shared/server-commands/server/config-command.ts | 2 |
7 files changed, 8 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index f3724a3bf..8aeeb7b7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md | |||
@@ -16,6 +16,7 @@ | |||
16 | * Add `client.videos.resumable_upload.max_chunk_size` config option [#4857](https://github.com/Chocobozzz/PeerTube/pull/4857) | 16 | * Add `client.videos.resumable_upload.max_chunk_size` config option [#4857](https://github.com/Chocobozzz/PeerTube/pull/4857) |
17 | * Add `object_storage.upload_acl` config option [#4861](https://github.com/Chocobozzz/PeerTube/pull/4861) | 17 | * Add `object_storage.upload_acl` config option [#4861](https://github.com/Chocobozzz/PeerTube/pull/4861) |
18 | * 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` | 18 | * 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` |
19 | * Removed `best` default trending algorithm. It is automatically used if using `hot` algorithm with a logged in user | ||
19 | 20 | ||
20 | ### Docker | 21 | ### Docker |
21 | 22 | ||
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 72c7e1ef6..d2782036b 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 | |||
173 | case 'most-liked': | 173 | case 'most-liked': |
174 | return '-likes' | 174 | return '-likes' |
175 | 175 | ||
176 | // We'll automatically apply "best" sort if using "hot" sort with a logged user | ||
177 | case 'best': | ||
178 | return '-hot' | ||
179 | |||
176 | default: | 180 | default: |
177 | return '-' + algorithm as VideoSortField | 181 | return '-' + algorithm as VideoSortField |
178 | } | 182 | } |
diff --git a/config/default.yaml b/config/default.yaml index 689f81343..54452d5e2 100644 --- a/config/default.yaml +++ b/config/default.yaml | |||
@@ -181,7 +181,6 @@ trending: | |||
181 | interval_days: 7 # Compute trending videos for the last x days | 181 | interval_days: 7 # Compute trending videos for the last x days |
182 | algorithms: | 182 | algorithms: |
183 | enabled: | 183 | enabled: |
184 | - 'best' # adaptation of Reddit's 'Best' algorithm (Hot minus History) | ||
185 | - 'hot' # adaptation of Reddit's 'Hot' algorithm | 184 | - 'hot' # adaptation of Reddit's 'Hot' algorithm |
186 | - 'most-viewed' # default, used initially by PeerTube as the trending page | 185 | - 'most-viewed' # default, used initially by PeerTube as the trending page |
187 | - 'most-liked' | 186 | - 'most-liked' |
diff --git a/config/production.yaml.example b/config/production.yaml.example index 6db43fccf..89b7fe966 100644 --- a/config/production.yaml.example +++ b/config/production.yaml.example | |||
@@ -177,7 +177,6 @@ trending: | |||
177 | interval_days: 7 # Compute trending videos for the last x days | 177 | interval_days: 7 # Compute trending videos for the last x days |
178 | algorithms: | 178 | algorithms: |
179 | enabled: | 179 | enabled: |
180 | - 'best' # adaptation of Reddit's 'Best' algorithm (Hot minus History) | ||
181 | - 'hot' # adaptation of Reddit's 'Hot' algorithm | 180 | - 'hot' # adaptation of Reddit's 'Hot' algorithm |
182 | - 'most-viewed' # default, used initially by PeerTube as the trending page | 181 | - 'most-viewed' # default, used initially by PeerTube as the trending page |
183 | - 'most-liked' | 182 | - 'most-liked' |
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts index c8dbbf797..99fb24a5b 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 () { | |||
165 | trending: { | 165 | trending: { |
166 | videos: { | 166 | videos: { |
167 | algorithms: { | 167 | algorithms: { |
168 | enabled: [ 'best', 'hot', 'most-viewed', 'most-liked' ], | 168 | enabled: [ 'hot', 'most-viewed', 'most-liked' ], |
169 | default: 'most-viewed' | 169 | default: 'most-viewed' |
170 | } | 170 | } |
171 | } | 171 | } |
diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts index f31012a5c..0f2fb5493 100644 --- a/server/tests/api/server/config.ts +++ b/server/tests/api/server/config.ts | |||
@@ -367,7 +367,7 @@ const newCustomConfig: CustomConfig = { | |||
367 | trending: { | 367 | trending: { |
368 | videos: { | 368 | videos: { |
369 | algorithms: { | 369 | algorithms: { |
370 | enabled: [ 'best', 'hot', 'most-viewed', 'most-liked' ], | 370 | enabled: [ 'hot', 'most-viewed', 'most-liked' ], |
371 | default: 'hot' | 371 | default: 'hot' |
372 | } | 372 | } |
373 | } | 373 | } |
diff --git a/shared/server-commands/server/config-command.ts b/shared/server-commands/server/config-command.ts index ed4961bc3..5320dead4 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 { | |||
356 | trending: { | 356 | trending: { |
357 | videos: { | 357 | videos: { |
358 | algorithms: { | 358 | algorithms: { |
359 | enabled: [ 'best', 'hot', 'most-viewed', 'most-liked' ], | 359 | enabled: [ 'hot', 'most-viewed', 'most-liked' ], |
360 | default: 'hot' | 360 | default: 'hot' |
361 | } | 361 | } |
362 | } | 362 | } |