このコミットが含まれているのは:
2026-07-16 18:16:20 +09:00
コミット f76fbe6711
14個のファイルの変更445行の追加43行の削除
+6 -7
ファイルの表示
@@ -1,4 +1,3 @@
require 'open-uri'
require 'set'
require 'time'
@@ -127,12 +126,12 @@ module Youtube
return if post.thumbnail.attached?
return if thumbnail_url.blank?
post.thumbnail.attach(
io: URI.open(thumbnail_url),
filename: File.basename(URI.parse(thumbnail_url).path),
content_type: 'image/jpeg')
post.resized_thumbnail!
post.attach_thumbnail_from_url!(thumbnail_url)
rescue Post::RemoteThumbnailFetchFailed => e
Rails.logger.info("youtube_sync_thumbnail_fetch_failed #{ { post_id: post.id,
thumbnail_url:,
error: e.class.name,
message: e.message }.to_json }")
end
def youtube_url_regexp id