From 3e632818493562e156989c5e00c73399c4621ead Mon Sep 17 00:00:00 2001 From: Mattias Tall Date: Tue, 26 May 2026 12:22:21 +0200 Subject: [PATCH] Fix channel avatars missing from all home-feed SQL modes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All inline SQL queries in the feed endpoint (chronological, random, inbox, ranked scored CTE, and discovery injection) were missing c.thumbnail_url AS channel_thumbnail_url — only _VIDEO_SELECT had it. Co-Authored-By: Claude Sonnet 4.6 --- backend/routers/videos.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/routers/videos.py b/backend/routers/videos.py index b643821..25dbe42 100644 --- a/backend/routers/videos.py +++ b/backend/routers/videos.py @@ -148,6 +148,7 @@ def home_feed( v.duration_seconds, v.published_at, v.tags, v.category, 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, @@ -180,6 +181,7 @@ def home_feed( v.duration_seconds, v.published_at, v.tags, v.category, 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, @@ -214,6 +216,7 @@ def home_feed( v.duration_seconds, v.published_at, v.tags, v.category, 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, @@ -261,6 +264,7 @@ def home_feed( v.duration_seconds, v.published_at, v.tags, v.category, 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, @@ -315,7 +319,8 @@ def home_feed( SELECT v.id, v.youtube_video_id, v.title, v.description, v.thumbnail_url, v.duration_seconds, v.published_at, v.tags, v.category, c.id AS channel_id, c.name AS channel_name, - c.youtube_channel_id AS channel_youtube_id + c.youtube_channel_id AS channel_youtube_id, + c.thumbnail_url AS channel_thumbnail_url FROM discovery_queue dq JOIN channels c ON dq.channel_id = c.id JOIN videos v ON v.channel_id = c.id