Fix length seconds for videos with longer duration

pull/530/head
Omar Roth 6 years ago
parent 7cd66e20d0
commit bdfe170c3b
No known key found for this signature in database
GPG Key ID: B8254FB7EC3D37F2

@ -64,8 +64,8 @@ def recode_length_seconds(time)
time = time.seconds time = time.seconds
text = "#{time.minutes.to_s.rjust(2, '0')}:#{time.seconds.to_s.rjust(2, '0')}" text = "#{time.minutes.to_s.rjust(2, '0')}:#{time.seconds.to_s.rjust(2, '0')}"
if time.hours > 0 if time.total_hours.to_i > 0
text = "#{time.hours.to_s.rjust(2, '0')}:#{text}" text = "#{time.total_hours.to_i.to_s.rjust(2, '0')}:#{text}"
end end
text = text.lchop('0') text = text.lchop('0')

Loading…
Cancel
Save