Merge pull request #91 from PietroCarrara/api-spoiler

Add spoiler information to the API
This commit is contained in:
nonmakina 2021-01-03 20:59:26 -06:00 committed by GitHub
commit ed7192a300
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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));
}