Not showing image in news if it failed to fetch

This commit is contained in:
pure_bliss
2025-04-26 15:26:17 +02:00
committed by Cyberarm
parent e73abce65e
commit 5ef11fbee8

View File

@@ -470,7 +470,9 @@ class W3DHub
flow(width: 1.0, max_width: 869, height: 200, margin: 8, border_thickness: 1, border_color: lighten(Gosu::Color.new(game.color))) do
background 0x44_000000
image image_path, height: 1.0
if File.file?(image_path)
image image_path, height: 1.0
end
stack(fill: true, height: 1.0, padding: 4, border_thickness_left: 1, border_color_left: lighten(Gosu::Color.new(game.color))) do
tagline "<b>#{item.title}</b>", width: 1.0
@@ -571,4 +573,4 @@ class W3DHub
end
end
end
end
end