feat: download top-5 cast photos during TMDb enrichment
Some checks failed
CI / Check / Test (push) Failing after 41s

This commit is contained in:
2026-06-03 00:42:25 +02:00
parent a5cf62e281
commit c842ad6a55
3 changed files with 64 additions and 12 deletions

View File

@@ -2,7 +2,7 @@ use crate::context::AppContext;
use crate::wrapup::{compute, queries::ComputeWrapUpQuery};
use domain::errors::DomainError;
use domain::events::DomainEvent;
use domain::models::wrapup::{DateRange, WrapUpReport, WrapUpScope, WrapUpStatus};
use domain::models::wrapup::{DateRange, WrapUpScope, WrapUpStatus};
use domain::ports::{VideoRenderAssets, VideoRenderConfig};
use domain::value_objects::WrapUpId;
@@ -41,8 +41,12 @@ pub async fn execute(
if let Some(ref renderer) = ctx.services.video_renderer {
let poster_images = resolve_images(ctx, &report.poster_paths, "poster").await;
let cast_images =
resolve_images(ctx, &report.top_cast_profile_paths, "cast").await;
let cast_keys: Vec<String> = report
.top_cast_profile_paths
.iter()
.map(|p| format!("cast{p}"))
.collect();
let cast_images = resolve_images(ctx, &cast_keys, "cast").await;
let wc = &ctx.config.wrapup;
let config = VideoRenderConfig {
slide_duration_secs: 4,