From 6a203044bda28ba800c16fc442abe9c2b6c9b3a8 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Tue, 2 Feb 2021 12:59:41 +0100 Subject: [PATCH] add best trending strategy based on Reddit's best inspired from https://www.reddit.com/r/changelog/comments/7spgg0/best_is_the_new_hotness/ this implementation only adds freshness, and doesn't personalize based on subscribed communities yet. --- .../edit-custom-config.component.html | 2 ++ .../video-trending-header.component.ts | 7 ++++ client/src/app/core/server/server.service.ts | 2 +- .../shared-icons/global-icon.component.ts | 3 +- client/src/assets/images/feather/award.svg | 1 + config/default.yaml | 3 +- config/production.yaml.example | 3 +- server/initializers/constants.ts | 2 +- server/models/video/video-query-builder.ts | 32 +++++++++++++------ server/models/video/video.ts | 2 ++ server/tests/api/check-params/config.ts | 2 +- server/tests/api/server/config.ts | 2 +- server/tests/api/videos/single-server.ts | 8 +++++ shared/extra-utils/server/config.ts | 2 +- shared/models/videos/video-sort-field.type.ts | 3 +- 15 files changed, 55 insertions(+), 19 deletions(-) create mode 100644 client/src/assets/images/feather/award.svg diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html index 796aa12edccd..48678a194dfb 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html @@ -271,6 +271,7 @@

Configuration

+ @@ -288,6 +289,7 @@

Configuration