Sprint 002: Ingest duration & view count, FTS search, infinite scroll pagination, and transcript accordion
Deploy t-youtube / Build & Deploy (push) Failing after 1s

This commit is contained in:
Gan, Jimmy
2026-07-11 13:16:59 +08:00
parent 623dff149c
commit 022b024603
6 changed files with 207 additions and 91 deletions
+10
View File
@@ -38,11 +38,21 @@ async def init_db():
video_id TEXT NOT NULL,
user_prompt TEXT NOT NULL,
status TEXT DEFAULT 'pending',
result TEXT,
created_at TEXT DEFAULT CURRENT_TIMESTAMP,
processed_at TEXT,
FOREIGN KEY (video_id) REFERENCES videos(video_id)
)
""")
# Migration: Add result column if it doesn't exist (since the DB might already exist)
try:
async with db.execute("PRAGMA table_info(agent_queue)") as cursor:
columns = [row[1] for row in await cursor.fetchall()]
if "result" not in columns:
await db.execute("ALTER TABLE agent_queue ADD COLUMN result TEXT")
except Exception as e:
# Table might not exist yet if not created, but CREATE TABLE IF NOT EXISTS handles it
pass
# FTS5 virtual table for full-text search on title + summary
await db.execute("""
CREATE VIRTUAL TABLE IF NOT EXISTS videos_fts USING fts5(