feat: richer profile stats, wrapup min-count filter, watch medium distribution
Some checks failed
CI / Check / Test (push) Has been cancelled

- filter wrapup top directors/actors with count < 2
- add watch_medium to wrapup report + adapters
- profile trends: genre breakdown, rating histogram, watch medium dist
- fix unused StarDisplay import in movie detail
This commit is contained in:
2026-07-10 21:38:08 +02:00
parent 498f3b1818
commit 587dcc04de
20 changed files with 411 additions and 85 deletions

View File

@@ -48,10 +48,25 @@ export const directorStatDtoSchema = z.object({
})
export type DirectorStatDto = z.infer<typeof directorStatDtoSchema>
export const genreStatDtoSchema = z.object({
genre: z.string(),
count: z.number(),
})
export type GenreStatDto = z.infer<typeof genreStatDtoSchema>
export const watchMediumStatDtoSchema = z.object({
medium: z.string(),
count: z.number(),
})
export type WatchMediumStatDto = z.infer<typeof watchMediumStatDtoSchema>
export const userTrendsDtoSchema = z.object({
monthly_ratings: z.array(monthlyRatingDtoSchema),
top_directors: z.array(directorStatDtoSchema),
max_director_count: z.number(),
top_genres: z.array(genreStatDtoSchema).default([]),
rating_distribution: z.array(z.number()).default([]),
watch_medium_distribution: z.array(watchMediumStatDtoSchema).default([]),
})
export type UserTrendsDto = z.infer<typeof userTrendsDtoSchema>

View File

@@ -99,6 +99,7 @@ export type WrapUpReport = {
lowest_rated_movie?: MovieRef
first_movie_of_period?: MovieRef
last_movie_of_period?: MovieRef
watch_medium_distribution: { medium: string; count: number }[]
poster_paths: string[]
top_cast_profile_paths: string[]
}