From e964ceccebee68e2329947aee0c668149bc0bf48 Mon Sep 17 00:00:00 2001 From: "hehihoho3@gmail.com" Date: Fri, 7 Aug 2026 12:07:02 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=9D=B8=EB=AC=BC=20=EC=B6=94=EC=A0=81?= =?UTF-8?q?=20=EC=87=BC=EC=B8=A0=20=EC=BB=B7=20180=EC=B4=88=EB=A1=9C=20?= =?UTF-8?q?=E2=80=94=203=EB=B6=84=EC=A7=9C=EB=A6=AC=20=EC=87=BC=EC=B8=A0?= =?UTF-8?q?=20=EC=B0=A8=EB=8B=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 인물 추적은 65초 컷으로 쇼츠를 걸렀지만 유튜브 쇼츠가 최대 3분까지 허용되면서 1~3분짜리 쇼츠가 통과해 인물 탭에 들어왔다. 수집(PersonPicks)과 조회(feedByPerson) 모두 180초 컷으로 올려 이미 담긴 1~3분 영상도 탭에서 사라지게 했다. Co-Authored-By: Claude Fable 5 --- .../yanalyst/domain/channel/ChannelVideoRepository.java | 5 +++-- .../com/hlab/yanalyst/domain/channel/PersonPicks.java | 9 ++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/hlab/yanalyst/domain/channel/ChannelVideoRepository.java b/src/main/java/com/hlab/yanalyst/domain/channel/ChannelVideoRepository.java index 70fbf35..90dc484 100644 --- a/src/main/java/com/hlab/yanalyst/domain/channel/ChannelVideoRepository.java +++ b/src/main/java/com/hlab/yanalyst/domain/channel/ChannelVideoRepository.java @@ -50,13 +50,14 @@ public interface ChannelVideoRepository extends JpaRepository 'EXCLUDED' " - + "and (v.durationSec is null or v.durationSec > 65) " + + "and (v.durationSec is null or v.durationSec > 180) " + "and (cast(:publishedAfter as timestamp) is null or v.publishedAt >= :publishedAfter) " + "and (:person is null or v.matchedPerson = :person) " + "and (:hideWorked = false or v.interestStatus = 'NEW') " diff --git a/src/main/java/com/hlab/yanalyst/domain/channel/PersonPicks.java b/src/main/java/com/hlab/yanalyst/domain/channel/PersonPicks.java index d27a651..7e3d2d6 100644 --- a/src/main/java/com/hlab/yanalyst/domain/channel/PersonPicks.java +++ b/src/main/java/com/hlab/yanalyst/domain/channel/PersonPicks.java @@ -24,6 +24,13 @@ public final class PersonPicks { "performance video", "mv", "m/v", "lyric video", "cover", "커버" ); + /** + * 이 길이 이하는 쇼츠로 보고 버린다. 유튜브 쇼츠가 최대 3분(180초)까지 허용되어 + * {@link VideoMetrics#isShorts}의 65초 컷으로는 1~3분짜리 쇼츠가 통과한다. + * 어차피 3분 이하는 자를 원본으로도 부족하다. + */ + public static final int SHORTS_MAX_SEC = 180; + private PersonPicks() {} /** 음악방송 무대·직캠·커버 영상인가(제목 기준). */ @@ -63,7 +70,7 @@ public final class PersonPicks { for (Found f : found) { if (f == null || f.videoId() == null || f.videoId().isBlank()) continue; // 쇼츠 제외 — 인물 추적의 목적은 자를 원본(롱폼)을 찾는 것 - if (f.durationSec() == null || VideoMetrics.isShorts(f.durationSec())) continue; + if (f.durationSec() == null || f.durationSec() <= SHORTS_MAX_SEC) continue; if (f.ytChannelId() != null && excludeChannels != null && excludeChannels.contains(f.ytChannelId())) continue; if (publishedAfter != null && f.publishedAt() != null