feat: merge year handle into api

This commit is contained in:
shinya
2025-07-11 12:38:46 +08:00
parent 868ec2d5aa
commit 6817ada00a
5 changed files with 18 additions and 27 deletions

View File

@@ -40,7 +40,7 @@ function SearchPageClient() {
const aggregatedResults = useMemo(() => {
const map = new Map<string, SearchResult[]>();
searchResults.forEach((item) => {
// 使用 title + year + type 作为键,year 不存在则使用 'unknown'
// 使用 title + year + type 作为键year 必然存在,但依然兜底 'unknown'
const key = `${item.title}-${item.year || 'unknown'}-${
item.episodes.length === 1 ? 'movie' : 'tv'
}`;