Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/bpm_detector/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading