fix: 같은 컷 그룹 안에 같은 댓글 카드가 두 장 뜨던 중복 제거

컷별 '채우기' 섹션(cand)이 그 컷 추천(rec)에 이미 나온 카드를 제외하지 않아,
타임스탬프 없는 댓글이 추천되면 추천 섹션과 채우기 섹션에 쌍으로 떴다.
다른 컷의 복사본은 '이동'용 쌍둥이라 그대로 두고, 같은 컷 안에서만 거른다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
hehihoho3@gmail.com 2026-08-05 15:51:00 +09:00
parent bb1f168e36
commit 5295d92dfc

View File

@ -220,11 +220,14 @@ function renderCutPanel(box,panelId,data,opts){
unit+" "+(cu.i+1)+" · "+cu.sec+"초 · 카드 "+cu.quota+"장"+
(cu.bottom?" — "+cu.bottom:"")+(why?" "+why:""),
rec.concat(rest),panelId,Math.max(CARD_PAGE,rec.length),cu.i));
// 부족분 채우기 — 컷마다 반복되므로 처음엔 조금만 그리고 나머지는 더보기로
if(cand.length)
// 부족분 채우기 — 컷마다 반복되므로 처음엔 조금만 그리고 나머지는 더보기로.
// 이 컷 추천(rec)에 이미 나온 카드는 뺀다 — 안 빼면 같은 컷 그룹 안에 같은 댓글이
// 두 장 뜬다(다른 컷의 복사본은 '이동'용이라 남기지만, 같은 컷 안은 순수 중복).
const fill=cand.filter(i=>!rec.includes(i));
if(fill.length)
body.appendChild(cardSection(
"↳ 좋아요 상위에서 채우기 "+cand.length+"장 (이 컷에 넣기)",
cand,panelId,CUT_FILL_PAGE,cu.i));
"↳ 좋아요 상위에서 채우기 "+fill.length+"장 (이 컷에 넣기)",
fill,panelId,CUT_FILL_PAGE,cu.i));
box.appendChild(grp);
}
}else{