mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-05-22 22:57:35 +08:00
fix: pass year to db
This commit is contained in:
@@ -62,19 +62,7 @@ export async function POST(request: NextRequest) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存播放记录(不包含user_id,将由savePlayRecord自动添加)
|
await db.savePlayRecord(authInfo.username, source, id, record);
|
||||||
const recordWithoutUserId = {
|
|
||||||
title: record.title,
|
|
||||||
source_name: record.source_name,
|
|
||||||
cover: record.cover,
|
|
||||||
index: record.index,
|
|
||||||
total_episodes: record.total_episodes,
|
|
||||||
play_time: record.play_time,
|
|
||||||
total_time: record.total_time,
|
|
||||||
save_time: record.save_time,
|
|
||||||
};
|
|
||||||
|
|
||||||
await db.savePlayRecord(authInfo.username, source, id, recordWithoutUserId);
|
|
||||||
|
|
||||||
return NextResponse.json({ success: true }, { status: 200 });
|
return NextResponse.json({ success: true }, { status: 200 });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ export interface PlayRecord {
|
|||||||
title: string;
|
title: string;
|
||||||
source_name: string;
|
source_name: string;
|
||||||
cover: string;
|
cover: string;
|
||||||
|
year: string;
|
||||||
index: number; // 第几集
|
index: number; // 第几集
|
||||||
total_episodes: number; // 总集数
|
total_episodes: number; // 总集数
|
||||||
play_time: number; // 播放进度(秒)
|
play_time: number; // 播放进度(秒)
|
||||||
@@ -18,6 +19,7 @@ export interface Favorite {
|
|||||||
source_name: string;
|
source_name: string;
|
||||||
total_episodes: number; // 总集数
|
total_episodes: number; // 总集数
|
||||||
title: string;
|
title: string;
|
||||||
|
year: string;
|
||||||
cover: string;
|
cover: string;
|
||||||
save_time: number; // 记录保存时间(时间戳)
|
save_time: number; // 记录保存时间(时间戳)
|
||||||
search_title?: string; // 搜索时使用的标题
|
search_title?: string; // 搜索时使用的标题
|
||||||
|
|||||||
Reference in New Issue
Block a user