jez500 / chorus

A Web UI for XBMC, focused on user experience and music. Get the latest version here: https://github.com/xbmc/chorus2
357 stars 54 forks source link

Better format for player current/total time #18

Closed amitkeret closed 10 years ago

amitkeret commented 10 years ago

In some cases, the current/total playing time were rendering wrong, specifically when minutes/seconds are less than 10.

So I get this, for eg: current - 0:6:33, total - 0:47:6 This should render like so: current - 0:06:33, total - 0:47:06

Added a new numPad() helper function, to make sure we always have the correct (2) number of digits for minutes/seconds in the player's current/total playing time.

jez500 commented 10 years ago

Hi, Thanks for this, I have actually been tinkering with time formatting this week, mainly to make the time work when streaming via soundcloud. I might tweak it to only show the leading 0 on mins when the hour is greater than 0 and same with seconds/mins. Just looks a bit nicer not having the extra 0 when not required :)