@@ -567,7 +567,7 @@ async def get_public_profile(
567567 list_ids = [row .id for row in lists_rows ]
568568
569569 # Fetch up to 3 preview posters per list using ROW_NUMBER
570- posters_by_list : dict [int , list [str ]] = {}
570+ posters_by_list : dict [int , list [dict ]] = {}
571571 if list_ids :
572572 ShowAlias = aliased (ShowModel )
573573 rn = func .row_number ().over (
@@ -579,18 +579,18 @@ async def get_public_profile(
579579 else_ = ShowAlias .poster_path ,
580580 ).label ("poster" )
581581 inner = (
582- select (ListItem .list_id , poster_col , rn )
582+ select (ListItem .list_id , poster_col , Media . adult , rn )
583583 .join (Media , ListItem .media_id == Media .id )
584584 .outerjoin (ShowAlias , ShowAlias .tmdb_id == Media .tmdb_id )
585585 .where (ListItem .list_id .in_ (list_ids ))
586586 ).subquery ()
587587 posters_q = await db .execute (
588- select (inner .c .list_id , inner .c .poster )
588+ select (inner .c .list_id , inner .c .poster , inner . c . adult )
589589 .where (inner .c .rn <= 3 )
590590 .where (inner .c .poster .isnot (None ))
591591 )
592592 for row in posters_q .all ():
593- posters_by_list .setdefault (row .list_id , []).append (row .poster )
593+ posters_by_list .setdefault (row .list_id , []).append ({ "url" : row .poster , "adult" : row . adult } )
594594
595595 user_lists = [
596596 {
0 commit comments