Merge branch 'main' into feature-ssulbox

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
skkimandCursor committed 2026-08-19 15:25:13 +09:00
commit fde48e8674
24 files changed
+793 -104

No files matched your search

+4
View File
@@ -73,6 +73,7 @@ class UnifiedItem:
like_count: int = 0
comment_count: int = 0
is_liked_by_me: bool = False
poster_url: Optional[str] = None
# ──────────────────────────────────────────────
@@ -190,6 +191,7 @@ def _video_branch(where: list, sort_by: str) -> Select:
Video.result_movie_url.label("movie_url"),
Video.created_at.label("created_at"),
Video.task_id.label("task_id"),
Video.poster_url.label("poster_url"),
]
if sort_by == SORT_LIKE:
cols.append(_video_like_subq().label("sort_value"))
@@ -208,6 +210,7 @@ def _ssul_branch(where: list, sort_by: str) -> Select:
SsulContent.created_at.label("created_at"),
# UNION 은 컬럼 수·순서가 양쪽 같아야 한다. 썰박스에는 task_id 가 없다.
literal("").label("task_id"),
SsulContent.poster_url.label("poster_url"),
]
if sort_by == SORT_LIKE:
cols.append(_ssul_like_subq().label("sort_value"))
@@ -399,6 +402,7 @@ def _to_items(rows) -> list[UnifiedItem]:
movie_url=r.movie_url,
created_at=r.created_at,
task_id=r.task_id or "",
poster_url=r.poster_url,
)
for r in rows
]