From f0d7c24c974eefe1967531cb5ded557775f575b2 Mon Sep 17 00:00:00 2001 From: Pietro Carrara Date: Sun, 3 Jan 2021 20:02:48 -0300 Subject: [PATCH] Add spoiler information to the API Using 1,0 rather than true,false keeps compatibility with Clover/Kuroba's implementation of vichan's API parser --- inc/api.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/api.php b/inc/api.php index 0ebaaf22..db8b6ad0 100644 --- a/inc/api.php +++ b/inc/api.php @@ -93,6 +93,7 @@ class Api { $dotPos = strrpos($file->file, '.'); $apiPost['ext'] = substr($file->file, $dotPos); $apiPost['tim'] = substr($file->file, 0, $dotPos); + $apiPost['spoiler'] = $file->thumb === 'spoiler' ? 1 : 0; if (isset ($file->hash) && $file->hash) { $apiPost['md5'] = base64_encode(hex2bin($file->hash)); }