Merge remote-tracking branch 'parent/main' into upstream-20250328

This commit is contained in:
KMY 2025-03-28 08:44:30 +09:00
commit 12ed20b6d5
257 changed files with 3505 additions and 2010 deletions

View file

@ -116,7 +116,7 @@ class MediaAttachment < ApplicationRecord
VIDEO_PASSTHROUGH_OPTIONS = {
video_codecs: ['h264'].freeze,
audio_codecs: ['aac', nil].freeze,
colorspaces: ['yuv420p'].freeze,
colorspaces: ['yuv420p', 'yuvj420p'].freeze,
options: {
format: 'mp4',
convert_options: {
@ -425,8 +425,10 @@ class MediaAttachment < ApplicationRecord
@paths_to_cache_bust = MediaAttachment.attachment_definitions.keys.flat_map do |attachment_name|
attachment = public_send(attachment_name)
next if attachment.blank?
styles = DEFAULT_STYLES | attachment.styles.keys
styles.map { |style| attachment.path(style) }
styles.map { |style| attachment.url(style) }
end.compact
rescue => e
# We really don't want any error here preventing media deletion