update trending to use trending_score

This commit is contained in:
zeppi 2021-12-02 15:18:21 -05:00 committed by jessopb
parent cfd876927f
commit f79446b1e7
3 changed files with 7 additions and 7 deletions

View file

@ -28,7 +28,7 @@ export const FRESH_DEFAULT = 'default';
export const FRESH_TYPES = [FRESH_DEFAULT, FRESH_DAY, FRESH_WEEK, FRESH_MONTH, FRESH_YEAR, FRESH_ALL]; export const FRESH_TYPES = [FRESH_DEFAULT, FRESH_DAY, FRESH_WEEK, FRESH_MONTH, FRESH_YEAR, FRESH_ALL];
export const ORDER_BY_TRENDING = 'trending'; export const ORDER_BY_TRENDING = 'trending';
export const ORDER_BY_TRENDING_VALUE = ['trending_group', 'trending_mixed']; export const ORDER_BY_TRENDING_VALUE = ['trending_score']; // was ['trending_group', 'trending_mixed'] - deprecated
export const ORDER_BY_TOP = 'top'; export const ORDER_BY_TOP = 'top';
export const ORDER_BY_TOP_VALUE = ['effective_amount']; export const ORDER_BY_TOP_VALUE = ['effective_amount'];
export const ORDER_BY_NEW = 'new'; export const ORDER_BY_NEW = 'new';

View file

@ -49,7 +49,7 @@ function ChannelsFollowingDiscover(props: Props) {
options: { options: {
pageSize: 12, pageSize: 12,
claimType: 'channel', claimType: 'channel',
orderBy: ['effective_amount'], orderBy: CS.ORDER_BY_TOP_VALUE,
}, },
}); });
@ -59,7 +59,7 @@ function ChannelsFollowingDiscover(props: Props) {
options: { options: {
pageSize: 8, pageSize: 8,
claimType: 'channel', claimType: 'channel',
orderBy: ['trending_group', 'trending_mixed'], orderBy: CS.ORDER_BY_TRENDING_VALUE,
}, },
}); });

View file

@ -235,7 +235,7 @@ export function GetLinksData(
)}`, )}`,
options: { options: {
claimType: ['stream'], claimType: ['stream'],
orderBy: ['release_time'], orderBy: CS.ORDER_BY_NEW_VALUE,
pageSize: getPageSize(12), pageSize: getPageSize(12),
channelIds: YOUTUBER_CHANNEL_IDS, channelIds: YOUTUBER_CHANNEL_IDS,
limitClaimsPerChannel: 1, limitClaimsPerChannel: 1,
@ -248,7 +248,7 @@ export function GetLinksData(
link: `/$/${PAGES.DISCOVER}?${CS.ORDER_BY_KEY}=${CS.ORDER_BY_TOP}&${CS.FRESH_KEY}=${CS.FRESH_DAY}`, link: `/$/${PAGES.DISCOVER}?${CS.ORDER_BY_KEY}=${CS.ORDER_BY_TOP}&${CS.FRESH_KEY}=${CS.FRESH_DAY}`,
options: { options: {
pageSize: getPageSize(showPersonalizedChannels || showPersonalizedTags ? 4 : 8), pageSize: getPageSize(showPersonalizedChannels || showPersonalizedTags ? 4 : 8),
orderBy: ['effective_amount'], orderBy: CS.ORDER_BY_TOP_VALUEs,
claimType: ['stream'], claimType: ['stream'],
limitClaimsPerChannel: 2, limitClaimsPerChannel: 2,
releaseTime: `>${Math.floor(moment().subtract(1, 'day').startOf('day').unix())}`, releaseTime: `>${Math.floor(moment().subtract(1, 'day').startOf('day').unix())}`,
@ -259,7 +259,7 @@ export function GetLinksData(
title: __('Top Channels On LBRY'), title: __('Top Channels On LBRY'),
link: `/$/${PAGES.DISCOVER}?claim_type=channel&${CS.ORDER_BY_KEY}=${CS.ORDER_BY_TOP}&${CS.FRESH_KEY}=${CS.FRESH_ALL}`, link: `/$/${PAGES.DISCOVER}?claim_type=channel&${CS.ORDER_BY_KEY}=${CS.ORDER_BY_TOP}&${CS.FRESH_KEY}=${CS.FRESH_ALL}`,
options: { options: {
orderBy: ['effective_amount'], orderBy: CS.ORDER_BY_TOP_VALUE,
claimType: ['channel'], claimType: ['channel'],
}, },
}; };
@ -268,7 +268,7 @@ export function GetLinksData(
title: __('Latest From @lbry'), title: __('Latest From @lbry'),
link: `/@lbry:3f`, link: `/@lbry:3f`,
options: { options: {
orderBy: ['release_time'], orderBy: CS.ORDER_BY_NEW_VALUE,
pageSize: getPageSize(4), pageSize: getPageSize(4),
channelIds: ['3fda836a92faaceedfe398225fb9b2ee2ed1f01a'], channelIds: ['3fda836a92faaceedfe398225fb9b2ee2ed1f01a'],
}, },