]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Completely remove best default trending algorithm
authorChocobozzz <me@florianbigard.com>
Fri, 3 Jun 2022 12:04:52 +0000 (14:04 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 3 Jun 2022 12:04:52 +0000 (14:04 +0200)
CHANGELOG.md
client/src/app/+videos/video-list/videos-list-common-page.component.ts
config/default.yaml
config/production.yaml.example
server/tests/api/check-params/config.ts
server/tests/api/server/config.ts
shared/server-commands/server/config-command.ts

index f3724a3bfa0aab72d3c845e08c38d3ec22e001e6..8aeeb7b7e4d231dc296cd40c3ccbd70e5847a140 100644 (file)
@@ -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
 
index 72c7e1ef69f9c9929ccaea703ff78c548d66dfed..d2782036b3d00f97610c23c22fece8d31c1d2d68 100644 (file)
@@ -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
     }
index 689f81343d948a1f57f74fe3dcebd6e9dd324f24..54452d5e26d9e580f63805a8344f47a84f628cc8 100644 (file)
@@ -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'
index 6db43fccf7139f9b24147f8757082dc2d2187621..89b7fe9662819cf7140c50713c7a9c8ae7574db3 100644 (file)
@@ -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'
index c8dbbf797c4a4125cdb91c496d30aec4efd05167..99fb24a5b3e5063ed9d2c0d52b4e331fa8fa758e 100644 (file)
@@ -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'
         }
       }
index f31012a5c4fdf1969cdcf2b02fddeecb95ba0d09..0f2fb5493cf84ae70e2c249557fdfe76a4b4bdaa 100644 (file)
@@ -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'
       }
     }
index ed4961bc3f72ea5c62990b15b7536a2882990e03..5320dead4705bfe42cbba88d944ce33e1a4174f8 100644 (file)
@@ -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'
           }
         }