diff --git a/src/bpm_detector/cli.py b/src/bpm_detector/cli.py index 0cb44a9..8e11894 100644 --- a/src/bpm_detector/cli.py +++ b/src/bpm_detector/cli.py @@ -321,8 +321,13 @@ def smart_progress_callback(progress: float, message: str = ""): bar = progress_bar(info.frames, args.sr) if args.progress else None def progress_callback(increment: int) -> None: + """Update progress bar to reflect absolute progress percentage.""" if bar: - bar.update(increment) + # ``increment`` represents the current percentage completed, + # so set ``bar.n`` directly and refresh to synchronize the + # visual bar with the provided value. + bar.n = increment + bar.refresh() try: results = analyzer.analyze_file(