Skip to content

Commit 0cb7e43

Browse files
Fix UI track progress on error correction passes
The track progress indicator goes out of bounds when additional read passes are performed for error correction.
1 parent 8be007d commit 0cb7e43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CUERipper.Avalonia/Views/MainWindow.axaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ private void RipperStatusCallback(object? sender, ReadProgressArgs args)
381381
{
382382
int passTotalLength = args.PassEnd - args.PassStart;
383383
double correctionLength = (double)passTotalLength / (correctionQuality + 1);
384-
double correctionProcessed = (double)processed / (correctionQuality + 1) + correctionLength * args.Pass;
384+
double correctionProcessed = (double)processed / (correctionQuality + 1) + correctionLength * Math.Min(args.Pass, correctionQuality);
385385
double currentProgress = args.PassStart + correctionProcessed;
386386

387387
lblStatus.Text = currentProgress >= audioLength ? _localizer["Status:Finalizing"] : status;

0 commit comments

Comments
 (0)