剧集更新提示

This commit is contained in:
mtvpls
2026-02-19 22:03:05 +08:00
parent b914133dd7
commit 84fec2eada
11 changed files with 175 additions and 49 deletions

View File

@@ -67,9 +67,9 @@ export class PostgresStorage implements IStorage {
INSERT INTO play_records (
username, key, title, source_name, cover, year,
episode_index, total_episodes, play_time, total_time,
save_time, search_title
save_time, search_title, new_episodes
)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)
ON CONFLICT (username, key) DO UPDATE SET
title = EXCLUDED.title,
source_name = EXCLUDED.source_name,
@@ -80,7 +80,8 @@ export class PostgresStorage implements IStorage {
play_time = EXCLUDED.play_time,
total_time = EXCLUDED.total_time,
save_time = EXCLUDED.save_time,
search_title = EXCLUDED.search_title
search_title = EXCLUDED.search_title,
new_episodes = EXCLUDED.new_episodes
`)
.bind(
userName,
@@ -94,7 +95,8 @@ export class PostgresStorage implements IStorage {
record.play_time,
record.total_time,
record.save_time,
record.search_title || ''
record.search_title || '',
record.new_episodes || null
)
.run();
} catch (err) {
@@ -301,6 +303,7 @@ export class PostgresStorage implements IStorage {
total_time: row.total_time,
save_time: row.save_time,
search_title: row.search_title || '',
new_episodes: row.new_episodes || undefined,
};
}