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

[Low-priority] Minutes section of hour-long times formatted without leading zero #1438

Closed
BenMusch opened this issue Jul 21, 2018 · 5 comments
Labels

Comments

@BenMusch
Copy link

What version of WebTorrent Desktop?

0.19.0

What operating system and version?

Fedora 27

What did you do?

Opened a torrent longer than 1 hour, started watching from the beginning

What did you expect to happen?

The remaining time would be formatted as 2:08:33

What actually happened?

Remaining time was formatted as 2:8:33

webtorrent-issue

@BenMusch
Copy link
Author

Don't know this codebase very well, but it seems like this issue is here? I think it should be totalMinutes <= 9?

@Borewit
Copy link
Member

Borewit commented Jul 21, 2018

Looks like you nailed the problem.

@BenMusch
Copy link
Author

Cool, I'll open a PR

BenMusch added a commit to BenMusch/webtorrent-desktop that referenced this issue Jul 21, 2018
Fixes webtorrent#1438

The if statement was testing the opposite of the case it was supposed to test. Changing `>` to `<=` would fix the issue, but there's no reason to even have the conditional to begin with, since `zeroPad(2, 10) === '10'`
@BenMusch
Copy link
Author

@Borewit actually I think that wasn't the problem -- that if condition should be checking if there are under 9 minutes total, so that a 9-minute time is displayed as 9:00 rather than 09:00.

That probably is still the source of the bug, but I'd need to look things over again before fixing it

@stale
Copy link

stale bot commented Oct 19, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Oct 19, 2018
@mathiasvr mathiasvr added the bug label Oct 19, 2018
@stale stale bot removed the stale label Oct 19, 2018
bnjmnt4n added a commit that referenced this issue Nov 4, 2018
The minutes field should be zero-padded as long as the playback media is longer than 9 minutes (including hours).

Fixes #1438.
@lock lock bot locked as resolved and limited conversation to collaborators Feb 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants