From 5ef11fbee8c0304e23c8157372757dbf8ff9f0e8 Mon Sep 17 00:00:00 2001 From: pure_bliss Date: Sat, 26 Apr 2025 15:26:17 +0200 Subject: [PATCH] Not showing image in news if it failed to fetch --- lib/pages/games.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/pages/games.rb b/lib/pages/games.rb index 5389c33..8dd76b2 100644 --- a/lib/pages/games.rb +++ b/lib/pages/games.rb @@ -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 "#{item.title}", width: 1.0 @@ -571,4 +573,4 @@ class W3DHub end end end -end \ No newline at end of file +end