From 1f83bb8517e49a92062315684c03a4740cba9acd Mon Sep 17 00:00:00 2001 From: "Roncero Blanco, Edgar" Date: Mon, 26 May 2025 17:24:00 +0200 Subject: [PATCH] Fix DeprecationWarning in BPM rounding; ensure BPM tags are correctly written and updated --- src/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index 58d4776..9778336 100644 --- a/src/app.py +++ b/src/app.py @@ -38,7 +38,7 @@ def analyze_bpm_librosa(file_path): try: y, sr = librosa.load(file_path, mono=True) tempo, _ = librosa.beat.beat_track(y=y, sr=sr) - return int(round(float(tempo))) + return int(round(float(tempo[0]))) except Exception as e: print(f"Error analyzing BPM for {file_path.name}: {e}") return None