disable trending classics

This commit is contained in:
Sean Yesmunt 2021-03-01 10:25:32 -05:00
parent 9d03968b5e
commit 812a06f001

View file

@ -127,12 +127,7 @@ export default function GetHomePageRowData(
pageSize: getPageSize(12), pageSize: getPageSize(12),
channelIds: YOUTUBER_CHANNEL_IDS, channelIds: YOUTUBER_CHANNEL_IDS,
limitClaimsPerChannel: 1, limitClaimsPerChannel: 1,
releaseTime: `>${Math.floor( releaseTime: `>${Math.floor(moment().subtract(1, 'months').startOf('week').unix())}`,
moment()
.subtract(1, 'months')
.startOf('week')
.unix()
)}`,
}, },
}; };
@ -159,18 +154,8 @@ export default function GetHomePageRowData(
orderBy: ['release_time'], orderBy: ['release_time'],
releaseTime: releaseTime:
subscribedChannels.length > 20 subscribedChannels.length > 20
? `>${Math.floor( ? `>${Math.floor(moment().subtract(6, 'months').startOf('week').unix())}`
moment() : `>${Math.floor(moment().subtract(1, 'year').startOf('week').unix())}`,
.subtract(6, 'months')
.startOf('week')
.unix()
)}`
: `>${Math.floor(
moment()
.subtract(1, 'year')
.startOf('week')
.unix()
)}`,
pageSize: getPageSize(subscribedChannels.length > 3 ? (subscribedChannels.length > 6 ? 16 : 8) : 4), pageSize: getPageSize(subscribedChannels.length > 3 ? (subscribedChannels.length > 6 ? 16 : 8) : 4),
channelIds: subscribedChannels.map((subscription: Subscription) => { channelIds: subscribedChannels.map((subscription: Subscription) => {
const { channelClaimId } = parseURI(subscription.uri); const { channelClaimId } = parseURI(subscription.uri);
@ -187,12 +172,7 @@ export default function GetHomePageRowData(
orderBy: ['effective_amount'], orderBy: ['effective_amount'],
claimType: ['stream'], claimType: ['stream'],
limitClaimsPerChannel: 2, limitClaimsPerChannel: 2,
releaseTime: `>${Math.floor( releaseTime: `>${Math.floor(moment().subtract(1, 'day').startOf('day').unix())}`,
moment()
.subtract(1, 'day')
.startOf('day')
.unix()
)}`,
}, },
}; };
@ -205,21 +185,21 @@ export default function GetHomePageRowData(
}, },
}; };
const TRENDING_CLASSICS = { // const TRENDING_CLASSICS = {
title: __('Trending Classics'), // title: __('Trending Classics'),
link: `/$/${PAGES.DISCOVER}?${CS.ORDER_BY_KEY}=${CS.ORDER_BY_TRENDING}&${CS.FRESH_KEY}=${CS.FRESH_WEEK}`, // link: `/$/${PAGES.DISCOVER}?${CS.ORDER_BY_KEY}=${CS.ORDER_BY_TRENDING}&${CS.FRESH_KEY}=${CS.FRESH_WEEK}`,
options: { // options: {
pageSize: getPageSize(4), // pageSize: getPageSize(4),
claimType: ['stream'], // claimType: ['stream'],
limitClaimsPerChannel: 1, // limitClaimsPerChannel: 1,
releaseTime: `<${Math.floor( // releaseTime: `<${Math.floor(
moment() // moment()
.subtract(6, 'month') // .subtract(6, 'month')
.startOf('day') // .startOf('day')
.unix() // .unix()
)}`, // )}`,
}, // },
}; // };
// const TRENDING_ON_LBRY = { // const TRENDING_ON_LBRY = {
// title: __('Trending On LBRY'), // title: __('Trending On LBRY'),
@ -236,7 +216,7 @@ export default function GetHomePageRowData(
options: { options: {
pageSize: getPageSize(4), pageSize: getPageSize(4),
tags: followedTags.map(tag => tag.name), tags: followedTags.map((tag) => tag.name),
claimType: ['stream'], claimType: ['stream'],
limitClaimsPerChannel: 2, limitClaimsPerChannel: 2,
}, },
@ -274,7 +254,7 @@ export default function GetHomePageRowData(
rowData.push(YOUTUBE_CREATOR_ROW); rowData.push(YOUTUBE_CREATOR_ROW);
} }
rowData.push(TRENDING_CLASSICS); // rowData.push(TRENDING_CLASSICS);
rowData.push(TOP_CONTENT_TODAY); rowData.push(TOP_CONTENT_TODAY);
// rowData.push(TRENDING_ON_LBRY); // rowData.push(TRENDING_ON_LBRY);