mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-02 04:52:50 +08:00
feat: B站首页推荐 — 个性化推荐/音乐区排行/热门视频
- BiliBiliProvider.getDailyRecommendSongs: 个性化推荐(登录后更准确), fallback 到音乐区排行榜 - BiliBiliProvider.getPopularVideos: 热门视频列表 - 新增 GET /api/music/bilibili/popular 端点 - 首页新增"B站热门"板块,带B站蓝色徽标 - Store 缓存 bilibiliPopular 数据 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
05d7f7d5f7
commit
cf293299c8
4 files changed
+141
-4
No files matched your search
@@ -197,6 +197,23 @@ export function createMusicRouter(
|
||||
}
|
||||
});
|
||||
|
||||
// B站热门视频
|
||||
router.get("/bilibili/popular", async (req, res) => {
|
||||
try {
|
||||
const provider = bilibiliProvider as any;
|
||||
if (provider.getPopularVideos) {
|
||||
const limit = parseInt(req.query.limit as string) || 20;
|
||||
const songs = await provider.getPopularVideos(limit);
|
||||
res.json({ songs });
|
||||
} else {
|
||||
res.json({ songs: [] });
|
||||
}
|
||||
} catch (err) {
|
||||
logger.error({ err }, "Get bilibili popular failed");
|
||||
res.status(500).json({ error: (err as Error).message });
|
||||
}
|
||||
});
|
||||
|
||||
// Get current quality
|
||||
router.get("/quality", (_req, res) => {
|
||||
res.json({
|
||||
|
||||
Reference in new issue
Block a user