fix(route): bilibili video page ordering, accept common limit params (#9634)
This commit is contained in:
@@ -25,12 +25,11 @@ module.exports = async (ctx) => {
|
||||
link,
|
||||
description: `视频 ${name} 的视频选集列表`,
|
||||
item: data
|
||||
.sort((a, b) => b.cid - a.cid)
|
||||
.slice(0, 10)
|
||||
.sort((a, b) => b.page - a.page)
|
||||
.slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 10)
|
||||
.map((item) => ({
|
||||
title: item.part,
|
||||
description: `${item.part} - ${name}${!disableEmbed ? `<br><br>${utils.iframe(aid, item.page, bvid)}` : ''}`,
|
||||
pubDate: new Date().toUTCString(),
|
||||
link: `${link}?p=${item.page}`,
|
||||
})),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user