mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-02-22 02:24:44 +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自动添加)
|
||||
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);
|
||||
await db.savePlayRecord(authInfo.username, source, id, record);
|
||||
|
||||
return NextResponse.json({ success: true }, { status: 200 });
|
||||
} catch (err) {
|
||||
|
||||
@@ -5,6 +5,7 @@ export interface PlayRecord {
|
||||
title: string;
|
||||
source_name: string;
|
||||
cover: string;
|
||||
year: string;
|
||||
index: number; // 第几集
|
||||
total_episodes: number; // 总集数
|
||||
play_time: number; // 播放进度(秒)
|
||||
@@ -18,6 +19,7 @@ export interface Favorite {
|
||||
source_name: string;
|
||||
total_episodes: number; // 总集数
|
||||
title: string;
|
||||
year: string;
|
||||
cover: string;
|
||||
save_time: number; // 记录保存时间(时间戳)
|
||||
search_title?: string; // 搜索时使用的标题
|
||||
|
||||
Reference in New Issue
Block a user