变更私人影库的key值方式

This commit is contained in:
mtvpls
2025-12-26 21:14:31 +08:00
parent df78abaf11
commit 3050cd48a9
15 changed files with 120 additions and 84 deletions
+3 -9
View File
@@ -125,16 +125,10 @@ export async function GET(request: NextRequest) {
const allVideos = Object.entries(metaInfo.folders)
.filter(([, info]) => includeFailed || !info.failed) // 根据参数过滤失败的视频
.map(
([folderName, info]) => {
// 构建 id:如果是第二季及以后,id 也要包含季度信息
let videoId = folderName;
if (info.season_number && info.season_number > 1 && info.season_name) {
videoId = `${folderName} ${info.season_name}`;
}
([key, info]) => {
return {
id: videoId,
folder: folderName,
id: key,
folder: info.folderName,
tmdbId: info.tmdb_id,
title: info.title,
poster: getTMDBImageUrl(info.poster_path),