From 3d4e112d16471703f51a542c0cc6e73a6f5db628 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 | 33 ++++++++++++------- server/models/video/video.ts | 6 ++-- 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, 57 insertions(+), 22 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 796aa12ed..48678a194 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 @@ + @@ -288,6 +289,7 @@