From c5877e6e89d430b4d91f1b5806a4a52515ca8650 Mon Sep 17 00:00:00 2001 From: Canopy2523 <141185375+Canopy2523@users.noreply.github.com> Date: Tue, 17 Feb 2026 15:41:24 +0500 Subject: [PATCH] change_thumbnail_size Wikipedia errors out on thumbnails with obsolete resolutions with "Error: 429, Use thumbnail steps listed on https://w.wiki/GHai." Indirectly fixes https://github.com/Nachtzuster/BirdNET-Pi/issues/568 and https://github.com/Nachtzuster/BirdNET-Pi/discussions/441 --- scripts/common.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/common.php b/scripts/common.php index fc05fcd..4d0fc2a 100644 --- a/scripts/common.php +++ b/scripts/common.php @@ -450,8 +450,8 @@ class Wikipedia extends ImageProvider { } else { $license_url = $this->get_external_link($image_url); } - if ($page["imageinfo"][0]["width"] > 1024) { - $image_url = preg_replace('#/commons/#', '/commons/thumb/', $image_url) . '/1024px-'. $image_name; + if ($page["imageinfo"][0]["width"] > 1280) { + $image_url = preg_replace('#/commons/#', '/commons/thumb/', $image_url) . '/1280px-'. $image_name; } }