Update la web app pour tirer partie du nouveau systeme de cache

This commit is contained in:
2025-10-28 00:10:51 +01:00
parent 8245fa6f41
commit 785f8d52a5
14 changed files with 459 additions and 43 deletions

View File

@@ -31,7 +31,7 @@ pub type Cache = pmocache::Cache<CoversConfig>;
///
/// Convertit automatiquement toute image téléchargée en format WebP
fn create_webp_transformer() -> StreamTransformer {
Box::new(|mut input, mut file, progress| {
Box::new(|mut input, mut file, context| {
Box::pin(async move {
// Télécharger tout en mémoire
let bytes = input.bytes().await?;
@@ -48,7 +48,7 @@ fn create_webp_transformer() -> StreamTransformer {
.await
.map_err(|e| e.to_string())?;
file.flush().await.map_err(|e| e.to_string())?;
progress(webp_data.len() as u64);
context.report_progress(webp_data.len() as u64);
Ok(())
})