Skip to content

Commit

Permalink
core: improve check for max retries to get a preview
Browse files Browse the repository at this point in the history
Change-Id: I19c2098cb58c054efc6f6beb15e0efccea105c2e
  • Loading branch information
andi34 committed Nov 24, 2023
1 parent 78473d3 commit 9923057
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,9 @@ const photoBooth = (function () {
break;
}

let maxGetMediaRetry = countdownTime - 1;
if (config.preview.killcmd && countdownTime > 0) {
maxGetMediaRetry = (countdownTime - parseInt(config.preview.stop_time, 10)) > 0 ? countdownTime - parseInt(config.preview.stop_time, 10) : countdownTime;
let maxGetMediaRetry = Math.max(countdownTime - 1, 0);
if (config.preview.killcmd && maxGetMediaRetry > 0) {
maxGetMediaRetry = Math.max(countdownTime - parseInt(config.preview.stop_time, 10), 0);
}
photoboothPreview.startVideo(CameraDisplayMode.COUNTDOWN, retry, maxGetMediaRetry);

Expand Down

0 comments on commit 9923057

Please sign in to comment.