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:
@@ -66,6 +66,7 @@ class VideoDetail(BaseModel):
|
||||
local_file_url: Optional[str] = None
|
||||
is_recommended: bool = False
|
||||
view_count: Optional[int] = None
|
||||
like_count: Optional[int] = None
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
@@ -422,7 +423,7 @@ def surprise_me(
|
||||
|
||||
_VIDEO_SELECT = """
|
||||
SELECT v.id, v.youtube_video_id, v.title, v.description, v.thumbnail_url,
|
||||
v.duration_seconds, v.published_at, v.tags, v.category, v.view_count,
|
||||
v.duration_seconds, v.published_at, v.tags, v.category, v.view_count, v.like_count,
|
||||
c.id AS channel_id, c.name AS channel_name, c.youtube_channel_id AS channel_youtube_id,
|
||||
COALESCE(uv.watched, 0) AS watched,
|
||||
COALESCE(uv.watch_progress_seconds, 0) AS watch_progress_seconds,
|
||||
|
||||
Reference in New Issue
Block a user