diff --git a/backend/routers/creators.py b/backend/routers/creators.py index a82faa0..0628a4c 100644 --- a/backend/routers/creators.py +++ b/backend/routers/creators.py @@ -129,6 +129,13 @@ async def get_creator( .where(SourceVideo.creator_id == creator.id) )).scalar() or 0 + # Moment count (key moments across all creator's videos) + moment_count = (await db.execute( + select(func.count()).select_from(KeyMoment) + .join(SourceVideo, KeyMoment.source_video_id == SourceVideo.id) + .where(SourceVideo.creator_id == creator.id) + )).scalar() or 0 + # Technique pages for this creator technique_rows = (await db.execute( select( diff --git a/backend/schemas.py b/backend/schemas.py index 66b374b..9a646f0 100644 --- a/backend/schemas.py +++ b/backend/schemas.py @@ -58,6 +58,7 @@ class CreatorDetail(CreatorRead): featured: bool = False video_count: int = 0 technique_count: int = 0 + moment_count: int = 0 techniques: list[CreatorTechniqueItem] = [] genre_breakdown: dict[str, int] = {} diff --git a/frontend/src/api/public-client.ts b/frontend/src/api/public-client.ts index 59830fc..30d9c60 100644 --- a/frontend/src/api/public-client.ts +++ b/frontend/src/api/public-client.ts @@ -196,6 +196,7 @@ export interface CreatorDetailResponse { featured: boolean; avatar_url: string | null; technique_count: number; + moment_count: number; techniques: CreatorTechniqueItem[]; genre_breakdown: Record; }