mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 14:08:32 +08:00
FIX: Video thumbnails for missing videos (#28152)
Skip trying to find a thumbnail if the video src cannot be found. Bug report: https://meta.discourse.org/t/317423
This commit is contained in:
@ -452,6 +452,7 @@ module PrettyText
|
||||
.css(".video-placeholder-container")
|
||||
.each do |video|
|
||||
video_src = video["data-video-src"]
|
||||
next if video_src == "/404" || video_src.nil?
|
||||
video_sha1 = File.basename(video_src, File.extname(video_src))
|
||||
thumbnail = Upload.where("original_filename LIKE ?", "#{video_sha1}.%").last
|
||||
if thumbnail
|
||||
|
Reference in New Issue
Block a user