ugoira: remove the PixivUgoiraFrameData model.
Remove the last remaining uses of the PixivUgoiraFrameData model. As of
32bfb8407, Ugoira frame data is now stored in the MediaMetadata model,
under the `Ugoira:FrameDelays` EXIF field.
The pixiv_ugoira_frame_data table still exists, but it can be removed
after this commit is deployed.
Fixes #5264: Error when replacing with ugoira.
This commit is contained in:
@@ -115,9 +115,9 @@ module Source
|
||||
end
|
||||
|
||||
def download_file!(url)
|
||||
file = super(url)
|
||||
file.frame_data = ugoira_frame_data if is_ugoira?
|
||||
file
|
||||
media_file = super(url)
|
||||
media_file.frame_delays = ugoira_frame_delays if is_ugoira?
|
||||
media_file
|
||||
end
|
||||
|
||||
def translate_tag(tag)
|
||||
@@ -162,8 +162,8 @@ module Source
|
||||
parsed_url.username || api_illust[:userAccount]
|
||||
end
|
||||
|
||||
def ugoira_frame_data
|
||||
api_ugoira[:frames]
|
||||
def ugoira_frame_delays
|
||||
api_ugoira[:frames].pluck("delay")
|
||||
end
|
||||
|
||||
memoize :illust_id, :api_client, :api_illust, :api_pages, :api_ugoira
|
||||
|
||||
Reference in New Issue
Block a user