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

@@ -94,9 +94,10 @@ impl<C: CacheConfig> Cache<C> {
///
/// let transformer_factory = Arc::new(|| {
/// // Créer un transformer qui convertit les données
/// Box::new(|input, file, progress| {
/// Box::new(|input, file, ctx| {
/// Box::pin(async move {
/// // Transformation personnalisée
/// ctx.report_progress(0);
/// Ok(())
/// })
/// }) as StreamTransformer
@@ -610,6 +611,15 @@ impl<C: CacheConfig> Cache<C> {
}
}
/// Retourne les métadonnées de transformation (si disponibles)
pub async fn transform_metadata(&self, pk: &str) -> Option<crate::download::TransformMetadata> {
if let Some(download) = self.get_download(pk).await {
download.transform_metadata().await
} else {
None
}
}
/// Indique si le téléchargement est terminé
///
/// # Arguments