diff --git a/backend/routers/videos.py b/backend/routers/videos.py index 3110d6f..b643821 100644 --- a/backend/routers/videos.py +++ b/backend/routers/videos.py @@ -68,6 +68,7 @@ class VideoDetail(BaseModel): view_count: Optional[int] = None like_count: Optional[int] = None dislike_count: Optional[int] = None + channel_thumbnail_url: Optional[str] = None model_config = {"from_attributes": True} @@ -426,6 +427,7 @@ _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.like_count, v.dislike_count, c.id AS channel_id, c.name AS channel_name, c.youtube_channel_id AS channel_youtube_id, + c.thumbnail_url AS channel_thumbnail_url, COALESCE(uv.watched, 0) AS watched, COALESCE(uv.watch_progress_seconds, 0) AS watch_progress_seconds, COALESCE(uv.downloaded, 0) AS is_downloaded, diff --git a/frontend/src/components/VideoCard.jsx b/frontend/src/components/VideoCard.jsx index e1b394b..bc21dfe 100644 --- a/frontend/src/components/VideoCard.jsx +++ b/frontend/src/components/VideoCard.jsx @@ -314,7 +314,7 @@ export default function VideoCard({ video, size = "md", onDismiss, variant = "gr } // ── Grid variant ───────────────────────────────────────────────────────── - const avatarUrl = channelMeta?.thumbnail_url ?? null; + const avatarUrl = video.channel_thumbnail_url ?? channelMeta?.thumbnail_url ?? null; const avatarLetter = video.channel_name?.[0]?.toUpperCase() ?? "?"; return (