dingle dongle i am tired

This commit is contained in:
Roscoe 2026-01-30 02:21:42 +00:00
commit 6b83c0b8c4
Signed by: RoscoeDaWah
SSH key fingerprint: SHA256:Hqn452XQ1ETzUt/FthJu6+OFkS4NBxCv5VQSEvuk7CE
5 changed files with 158 additions and 15 deletions

View file

@ -6,4 +6,16 @@ module ClipsHelper
Time.at(seconds.round).utc.strftime("%M:%S") #=> "01:00:00"
end
end
def get_video_aspect(video)
if video.metadata["width"] and video.metadata["height"]
width = video.metadata["width"].round
height = video.metadata["height"].round
common_fact = width.gcd(height)
width_div = width / common_fact
height_div = height / common_fact
return "#{width_div}:#{height_div}"
end
return ""
end
end