Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Showing incorrect duration after running the regeneration #105

Open
renatho opened this issue Jun 24, 2020 · 2 comments
Open

Showing incorrect duration after running the regeneration #105

renatho opened this issue Jun 24, 2020 · 2 comments
Labels
[Pri] Low Cosmetic issue, low impact, easy workaround. [Type] Bug

Comments

@renatho
Copy link
Contributor

renatho commented Jun 24, 2020

There is an issue while showing the time duration after running the regeneration.

I tested and for a result in +1 minute, I had the following feedback:

Screen Shot 2020-06-24 at 11 58 03

A user reported that she had the feedback 0.6 minutes after ~30 minutes.

Probably the issue is here:

// If done, show how long it took
if (processed == totalItems) {
let secondsTaken = (Date.now() - startTime) / 1000;
let durationString = '';
if (secondsTaken > 3600) {
let hoursTaken = secondsTaken / 3600;
durationString = vue.regenerateThumbnails.l10n.RegenerateMultiple.hours.formatUnicorn({
count: hoursTaken.toFixed(1),
});
} else if (secondsTaken > 60) {
let minutesTaken = secondsTaken / 3600;
durationString = vue.regenerateThumbnails.l10n.RegenerateMultiple.minutes.formatUnicorn({
count: minutesTaken.toFixed(1),
});
} else {
durationString = vue.regenerateThumbnails.l10n.RegenerateMultiple.seconds.formatUnicorn({
count: secondsTaken.toFixed(),
});
}
vue.finishedMessage = vue.regenerateThumbnails.l10n.RegenerateMultiple.duration.formatUnicorn({
duration: durationString,
});
}

@renatho renatho added [Type] Bug [Pri] Low Cosmetic issue, low impact, easy workaround. [Status] Queued In the queue of issues to work on next. labels Jun 24, 2020
@kunal13053
Copy link

Hello, Can I work on this?

@renatho
Copy link
Contributor Author

renatho commented Jun 24, 2020

Hey @kunal13053!

Sure! Feel free to create a PR with the solution! It's always a pleasure to receive contributions from the community!

@gikaragia gikaragia removed the [Status] Queued In the queue of issues to work on next. label Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Pri] Low Cosmetic issue, low impact, easy workaround. [Type] Bug
Projects
None yet
Development

No branches or pull requests

3 participants