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
This commit is contained in:
+2
-2
@@ -450,8 +450,8 @@ class Wikipedia extends ImageProvider {
|
|||||||
} else {
|
} else {
|
||||||
$license_url = $this->get_external_link($image_url);
|
$license_url = $this->get_external_link($image_url);
|
||||||
}
|
}
|
||||||
if ($page["imageinfo"][0]["width"] > 1024) {
|
if ($page["imageinfo"][0]["width"] > 1280) {
|
||||||
$image_url = preg_replace('#/commons/#', '/commons/thumb/', $image_url) . '/1024px-'. $image_name;
|
$image_url = preg_replace('#/commons/#', '/commons/thumb/', $image_url) . '/1280px-'. $image_name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user