Add like count to videos

Same pattern as view_count: model column, yt-dlp extraction, SQL select,
VideoDetail field, startup migration, and display in Watch meta row.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Mattias Tall
2026-05-26 11:25:44 +02:00
parent ffd46b5e08
commit 3f225e7647
5 changed files with 6 additions and 1 deletions

View File

@@ -84,6 +84,7 @@ def init_db():
try:
# Column migrations — safe to run on every startup
_add_column_if_missing(raw_conn, "videos", "view_count", "INTEGER")
_add_column_if_missing(raw_conn, "videos", "like_count", "INTEGER")
raw_conn.commit()
# executescript handles multi-statement SQL including trigger BEGIN...END blocks
raw_conn.executescript(FTS_SETUP_SQL)