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

@@ -96,9 +96,7 @@ export default function VideoCard({
aggregateData?.mostFrequentDoubanId ?? douban_id
);
const actualEpisodes = aggregateData?.mostFrequentEpisodes ?? episodes;
const actualYear = isAggregate
? aggregateData?.first.year || 'unknown'
: year;
const actualYear = aggregateData?.first.year ?? year;
const actualQuery = query || '';
const actualSearchType = isAggregate
? aggregateData?.first.episodes.length === 1