Browse Source

Completely remove best default trending algorithm

Chocobozzz 1 year ago
parent
commit
010382b603

+ 1 - 0
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
 

+ 4 - 0
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
     }

+ 0 - 1
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'

+ 0 - 1
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'

+ 1 - 1
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'
         }
       }

+ 1 - 1
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'
       }
     }

+ 1 - 1
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'
           }
         }