On complète la gestion du cache pour les métadonnées
This commit is contained in:
@@ -21,7 +21,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
let pk = cache::add_with_metadata_extraction(&cache, test_url, Some("test")).await?;
|
||||
|
||||
println!("\nPK: {}", pk);
|
||||
let file_path = cache.file_path(&pk);
|
||||
let file_path = cache.get_file_path(&pk);
|
||||
println!("File path: {}", file_path.display());
|
||||
|
||||
// Vérifier le format
|
||||
|
||||
@@ -33,7 +33,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
println!("✓ Fichier converti avec succès!");
|
||||
println!(" Clé primaire: {}", pk);
|
||||
|
||||
let file_path = cache.file_path(&pk);
|
||||
let file_path = cache.get_file_path(&pk);
|
||||
println!(" Chemin: {}", file_path.display());
|
||||
|
||||
if let Ok(metadata) = std::fs::metadata(&file_path) {
|
||||
|
||||
@@ -384,7 +384,7 @@ pub async fn add_with_metadata_extraction(
|
||||
cache.wait_until_finished(&pk).await?;
|
||||
|
||||
// Lire le fichier FLAC pour extraire les métadonnées
|
||||
let file_path = cache.file_path(&pk);
|
||||
let file_path = cache.get_file_path(&pk);
|
||||
let flac_bytes = tokio::fs::read(&file_path).await?;
|
||||
|
||||
// Extraire les métadonnées
|
||||
|
||||
Reference in New Issue
Block a user