mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
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.
This commit is contained in:
@@ -141,7 +141,7 @@ describe('Test config API validators', function () {
|
||||
trending: {
|
||||
videos: {
|
||||
algorithms: {
|
||||
enabled: [ 'hot', 'most-viewed', 'most-liked' ],
|
||||
enabled: [ 'best', 'hot', 'most-viewed', 'most-liked' ],
|
||||
default: 'most-viewed'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -375,7 +375,7 @@ describe('Test config', function () {
|
||||
trending: {
|
||||
videos: {
|
||||
algorithms: {
|
||||
enabled: [ 'hot', 'most-viewed', 'most-liked' ],
|
||||
enabled: [ 'best', 'hot', 'most-viewed', 'most-liked' ],
|
||||
default: 'hot'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -363,6 +363,14 @@ describe('Test a single server', function () {
|
||||
expect(videos.length).to.equal(2)
|
||||
})
|
||||
|
||||
it('Should list and sort by best in descending order', async function () {
|
||||
const res = await getVideosListPagination(server.url, 0, 2, '-best')
|
||||
|
||||
const videos = res.body.data
|
||||
expect(res.body.total).to.equal(6)
|
||||
expect(videos.length).to.equal(2)
|
||||
})
|
||||
|
||||
it('Should update a video', async function () {
|
||||
const attributes = {
|
||||
name: 'my super video updated',
|
||||
|
||||
Reference in New Issue
Block a user