feat: favorite actors top-5 stat in profile trends
All checks were successful
CI / Check / Test (push) Successful in 1h5m14s

This commit is contained in:
2026-08-09 20:59:18 +02:00
parent d282e8ea7e
commit 4d221e60de
13 changed files with 297 additions and 10 deletions

View File

@@ -24,7 +24,7 @@ use crate::{
state::AppState,
};
use api_types::{
DiaryResponse, DirectorStatDto, GenreStatDto, MonthActivityDto, MonthlyRatingDto,
ActorStatDto, DiaryResponse, DirectorStatDto, GenreStatDto, MonthActivityDto, MonthlyRatingDto,
ProfileResponse, UserProfileQueryParams, UserProfileResponse, UserStatsDto, UserSummaryDto,
UserTrendsDto, UsersResponse, WatchMediumStatDto,
};
@@ -427,6 +427,16 @@ fn trends_to_dto(t: domain::models::UserTrends) -> UserTrendsDto {
count: m.count,
})
.collect(),
top_actors: t
.top_actors
.into_iter()
.map(|a| ActorStatDto {
name: a.name,
profile_path: a.profile_path,
movie_count: a.movie_count,
score: a.score,
})
.collect(),
}
}