ugoira: store frame delays in MediaMetadata model.
Store Ugoira frame delays in the MediaMetadata model as a fake EXIF field instead of in the PixivUgoiraFrameData model. This way we can get rid of the PixivUgoiraFrameData model completely. This is a step towards fixing #5264.
This commit is contained in:
@@ -56,6 +56,7 @@ class Post < ApplicationRecord
|
||||
belongs_to :uploader, :class_name => "User", :counter_cache => "post_upload_count"
|
||||
belongs_to :parent, class_name: "Post", optional: true
|
||||
has_one :media_asset, -> { active }, foreign_key: :md5, primary_key: :md5
|
||||
has_one :media_metadata, through: :media_asset
|
||||
has_one :artist_commentary, :dependent => :destroy
|
||||
has_one :pixiv_ugoira_frame_data, class_name: "PixivUgoiraFrameData", foreign_key: :md5, primary_key: :md5
|
||||
has_one :vote_by_current_user, -> { active.where(user_id: CurrentUser.id) }, class_name: "PostVote" # XXX using current user here is wrong
|
||||
|
||||
Reference in New Issue
Block a user