diff --git a/backend/app/youtube_manage.py b/backend/app/youtube_manage.py index 0659b83..5302031 100644 --- a/backend/app/youtube_manage.py +++ b/backend/app/youtube_manage.py @@ -106,16 +106,21 @@ def list_managed_channels() -> list[dict[str, Any]]: rows = db.list_shorts_channels() out = [] for ch in rows: + sn = _snippet_from_channel_row(ch) or {} out.append( { "id": ch.get("id"), "name": ch.get("name"), - "youtube_channel_id": ch.get("youtube_channel_id"), + "youtube_channel_id": ch.get("youtube_channel_id") or sn.get("youtube_channel_id") or "", "enabled": bool(ch.get("enabled")), "authorized": bool(str(ch.get("refresh_token") or "").strip()), "daily_min": ch.get("daily_min"), "daily_max": ch.get("daily_max"), "privacy": ch.get("privacy"), + "title": sn.get("title") or ch.get("name"), + "custom_url": sn.get("custom_url") or "", + "thumb_url": sn.get("thumb_url") or "", + "yt_profile": sn or None, } ) return out diff --git a/frontend/src/app/youtube/page.tsx b/frontend/src/app/youtube/page.tsx index 2a24d03..cf332bf 100644 --- a/frontend/src/app/youtube/page.tsx +++ b/frontend/src/app/youtube/page.tsx @@ -24,6 +24,7 @@ import { useConfirm } from "@/components/ConfirmDialog"; import { useToast } from "@/components/Toast"; import { YouTubeLiveBadge } from "@/components/YouTubeLiveBadge"; import { YtAssignPanel } from "@/components/YtAssignPanel"; +import { YtChannelProfileSnippet } from "@/components/YtChannelProfileSnippet"; import { fetchJson, fmtTs } from "@/lib/api"; import { shortsLiveRef } from "@/lib/youtubeLive"; @@ -38,6 +39,10 @@ type ManagedChannel = { authorized?: boolean; daily_min?: number; daily_max?: number; + title?: string; + thumb_url?: string; + custom_url?: string; + yt_profile?: any; }; type YtVideo = { @@ -315,18 +320,31 @@ export default function YouTubePage() { ) : ( <> +
+ {channels.map((c) => { + const active = c.id === channelPk; + return ( + + ); + })} +
- {channelPk ? : null}