Much base work started
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled

This commit is contained in:
Dan Milne
2025-10-31 14:36:14 +11:00
parent 4a35bf6758
commit 88a906064f
97 changed files with 5333 additions and 2774 deletions

20
app/models/video.rb Normal file
View File

@@ -0,0 +1,20 @@
class Video < MediaFile
# Video-specific associations
has_many :video_assets, dependent: :destroy
# Video-specific metadata store
store :video_metadata, accessors: [:width, :height, :video_codec, :audio_codec, :frame_rate]
# Video-specific instance methods
def resolution_label
return "Unknown" unless height
case height
when 0..480 then "SD"
when 481..720 then "720p"
when 721..1080 then "1080p"
when 1081..1440 then "1440p"
when 1441..2160 then "4K"
else "8K+"
end
end
end