feat: 인물 추적 쇼츠 컷 180초로 — 3분짜리 쇼츠 차단
인물 추적은 65초 컷으로 쇼츠를 걸렀지만 유튜브 쇼츠가 최대 3분까지 허용되면서 1~3분짜리 쇼츠가 통과해 인물 탭에 들어왔다. 수집(PersonPicks)과 조회(feedByPerson) 모두 180초 컷으로 올려 이미 담긴 1~3분 영상도 탭에서 사라지게 했다. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
f96e4c583d
commit
e964cecceb
@ -50,13 +50,14 @@ public interface ChannelVideoRepository extends JpaRepository<ChannelVideo, Long
|
||||
|
||||
/**
|
||||
* 인물 탭 조회. source 가 아니라 matchedPerson 기준이라, 소스 채널에서 이미 수집한 영상이
|
||||
* 인물 검색에도 걸리면 두 탭 모두에 나타난다. 롱폼만 본다.
|
||||
* 인물 검색에도 걸리면 두 탭 모두에 나타난다. 롱폼만 본다
|
||||
* (180초 컷 = {@link PersonPicks#SHORTS_MAX_SEC} — 3분짜리 쇼츠까지 걸러낸다).
|
||||
*
|
||||
* @param person null 이면 추적 중인 인물 전체
|
||||
*/
|
||||
@Query("select v from ChannelVideo v where v.matchedPerson is not null "
|
||||
+ "and v.interestStatus <> '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') "
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user