diff options
| author | Omar Roth <omarroth@protonmail.com> | 2019-05-11 10:57:58 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@protonmail.com> | 2019-05-11 10:59:47 -0500 |
| commit | bdfe170c3b8721c5afe5f7e1fc7abe14308dd98a (patch) | |
| tree | 756dd138ffff0a71b480c6d1e850cd7d81697e8b /src | |
| parent | 7cd66e20d0529b9bab07fd77849cbfae225e7a4d (diff) | |
| download | invidious-bdfe170c3b8721c5afe5f7e1fc7abe14308dd98a.tar.gz invidious-bdfe170c3b8721c5afe5f7e1fc7abe14308dd98a.tar.bz2 invidious-bdfe170c3b8721c5afe5f7e1fc7abe14308dd98a.zip | |
Fix length seconds for videos with longer duration
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/helpers/utils.cr | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/invidious/helpers/utils.cr b/src/invidious/helpers/utils.cr index c1aea5b2..9bdb6a7e 100644 --- a/src/invidious/helpers/utils.cr +++ b/src/invidious/helpers/utils.cr @@ -64,8 +64,8 @@ def recode_length_seconds(time) time = time.seconds text = "#{time.minutes.to_s.rjust(2, '0')}:#{time.seconds.to_s.rjust(2, '0')}" - if time.hours > 0 - text = "#{time.hours.to_s.rjust(2, '0')}:#{text}" + if time.total_hours.to_i > 0 + text = "#{time.total_hours.to_i.to_s.rjust(2, '0')}:#{text}" end text = text.lchop('0') |
