diff --git a/src/Booru/Danbooru/DanbooruPost.php b/src/Booru/Danbooru/DanbooruPost.php index 029601d..86704e9 100644 --- a/src/Booru/Danbooru/DanbooruPost.php +++ b/src/Booru/Danbooru/DanbooruPost.php @@ -4,8 +4,6 @@ namespace Satori\Booru\Danbooru; use Satori\Booru\IBooruPostWithSpecificTags; class DanbooruPost implements IBooruPostWithSpecificTags { - private const ALLOW_FILE_URL_RATING = ['g', 's']; - public function __construct(private array $info) {} public function getId(): string { @@ -25,7 +23,7 @@ class DanbooruPost implements IBooruPostWithSpecificTags { } public function hasFileUrl(): bool { - return array_key_exists('file_url', $this->info) && in_array($this->info['rating'], self::ALLOW_FILE_URL_RATING); + return array_key_exists('file_url', $this->info); } public function getFileUrl(): string { diff --git a/src/Booru/Gelbooru/GelbooruPost.php b/src/Booru/Gelbooru/GelbooruPost.php index 2267afe..7e4408c 100644 --- a/src/Booru/Gelbooru/GelbooruPost.php +++ b/src/Booru/Gelbooru/GelbooruPost.php @@ -23,7 +23,7 @@ class GelbooruPost implements IBooruPost { } public function hasFileUrl(): bool { - return false; // remote embedding is blocked + return array_key_exists('file_url', $this->info); } public function getFileUrl(): string { diff --git a/src/Booru/Konachan/KonachanPost.php b/src/Booru/Konachan/KonachanPost.php index b5aaab5..0e39505 100644 --- a/src/Booru/Konachan/KonachanPost.php +++ b/src/Booru/Konachan/KonachanPost.php @@ -28,7 +28,7 @@ class KonachanPost implements IBooruPost { } public function hasFileUrl(): bool { - return false; // remote embedding is blocked + return array_key_exists('file_url', $this->info); } public function getFileUrl(): string { diff --git a/src/Booru/Yandere/YanderePost.php b/src/Booru/Yandere/YanderePost.php index 7f488ae..64d5c0b 100644 --- a/src/Booru/Yandere/YanderePost.php +++ b/src/Booru/Yandere/YanderePost.php @@ -23,10 +23,12 @@ class YanderePost implements IBooruPost { } public function hasFileUrl(): bool { - return false; // remote embedding is blocked + // yandere images get fucking massive sometimes + // and make the upload process timeout and silently fail + return false; } public function getFileUrl(): string { - return $this->info['file_url']; + return $this->info['sample_url']; } }