mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
don't think anyone is uploading hourlong animations
This commit is contained in:
parent
9d0d622fbd
commit
f98aa22bda
1 changed files with 5 additions and 4 deletions
|
@ -63,11 +63,12 @@
|
|||
= @image.image_height
|
||||
|
||||
= if not is_nil(@image.image_duration) and @image.image_is_animated and @image.image_duration > 0 do
|
||||
span.image-size
|
||||
span.image-size title=@image.image_duration
|
||||
|
|
||||
- dur = ceil(@image.image_duration)
|
||||
- {hh, mm, ss} = {div(dur, 3600), div(rem(dur, 3600), 60), rem(dur, 60)}
|
||||
= :io_lib.format("~2..0B:~2..0B:~2..0B", [hh, mm, ss])
|
||||
- dur = trunc(@image.image_duration)
|
||||
- ms = trunc((@image.image_duration - dur)*100)
|
||||
- {mm, ss} = {div(dur, 60), rem(dur, 60)}
|
||||
= :io_lib.format("~2..0B:~2..0B.~2..0B", [mm, ss, ms])
|
||||
|
||||
=<> String.upcase(to_string(@image.image_format))
|
||||
- size_kb = div(@image.image_size, 1000)
|
||||
|
|
Loading…
Reference in a new issue