diff --git a/index.html b/index.html
index 8282a33..786ed42 100644
--- a/index.html
+++ b/index.html
@@ -379,7 +379,7 @@ $.set('#subcategory', 'change', (e) => {
});
$.set('#chunksize', 'change', (e) => {
- let limit = minor || major - 1;
+ let limit = Math.max(minor, major - 1);
let value = Math.floor(limit / e.target.valueAsNumber);
$('#limit').value = value;
$('#offset').max = value;
@@ -452,17 +452,17 @@ while (await new Promise(o => setTimeout(o, 1000, true))) {
let limit = minor || major - 1;
let chunk = $('#chunksize').valueAsNumber;
let total = $('#slice').checked ? Math.min(chunk, limit - chunk * $('#offset').valueAsNumber) : limit;
- let index = $('#slice').checked ? done + skip - omit : done + skip;
+ let count = $('#slice').checked ? done + skip - omit : done + skip;
- $('#progressLabel').innerText = `${parseFloat(index / total * 100).toFixed(2)}% (${index}/${total})`;
+ $('#progressLabel').innerText = `${parseFloat(count / total * 100).toFixed(2)}% (${count}/${total})`;
$('#subjectLabel').innerText = subject ?? '';
$('#recipientLabel').innerText = recipient ? `${recipient} <${email}>` : email ?? '';
let uptime = await Rpc2.invoke('uptime').catch(() => 0);
$('#uptimeLabel').innerText = Temporal.Duration.from({ seconds: uptime }).round({ largestUnit: 'hours' }).toLocaleString('en', { style: 'digital' });
- let rate = index / uptime;
- let remaining = index ? Math.floor((total - index) / rate) : 0;
+ let rate = count / uptime;
+ let remaining = count ? Math.floor((total - count) / rate) : 0;
$('#remainingLabel').innerText = remaining >= 0 ? `${Temporal.Duration.from({ seconds: remaining }).round({ largestUnit: 'hours' }).toLocaleString('en')} (${(rate * 60).toFixed(2)}/min)` : '';
break;
case 'STANDBY':
diff --git a/main.py b/main.py
index 203e451..f2124ab 100644
--- a/main.py
+++ b/main.py
@@ -415,6 +415,7 @@ def main(driver: Chrome, logger = logging.getLogger('main')):
if (sent := cell(index, column.sent).value) is not None and str(sent).strip():
logger.info("[%d/%d] Already visited; skipping '%s'", index-1, limit-1, email)
occurrence[code] += 1
+ progress['omit'] += 1
raise Skip()
match options.get('occurrence'):