fix: broadcast AP Update after poster sync to fix missing posters on remote instances
Some checks failed
CI / Check / Test (push) Has been cancelled
Some checks failed
CI / Check / Test (push) Has been cancelled
New movies had no poster at AP broadcast time (race between poster sync and ReviewLogged handler). PosterSynced event now fires after sync completes, triggering Update notes so remote apps get the poster URL.
This commit is contained in:
@@ -82,7 +82,22 @@ impl PosterSyncHandler {
|
||||
let poster_path = PosterPath::new(stored_path)?;
|
||||
|
||||
movie.update_poster(poster_path);
|
||||
self.movie_repository.upsert_movie(&movie).await
|
||||
self.movie_repository.upsert_movie(&movie).await?;
|
||||
|
||||
if let Err(e) = self
|
||||
.event_publisher
|
||||
.publish(&DomainEvent::PosterSynced {
|
||||
movie_id: movie.id().clone(),
|
||||
})
|
||||
.await
|
||||
{
|
||||
tracing::warn!(
|
||||
"failed to emit PosterSynced for {}: {e}",
|
||||
movie.id().value()
|
||||
);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user