|
@ -93,6 +93,12 @@ class Api { |
|
|
$dotPos = strrpos($file->file, '.'); |
|
|
$dotPos = strrpos($file->file, '.'); |
|
|
$apiPost['ext'] = substr($file->file, $dotPos); |
|
|
$apiPost['ext'] = substr($file->file, $dotPos); |
|
|
$apiPost['tim'] = substr($file->file, 0, $dotPos); |
|
|
$apiPost['tim'] = substr($file->file, 0, $dotPos); |
|
|
|
|
|
|
|
|
|
|
|
// Add spoiler flag to API data |
|
|
|
|
|
$apiPost['spoiler'] = 0; |
|
|
|
|
|
if(isset($file->thumb) && $file->thumb == 'spoiler') |
|
|
|
|
|
$apiPost['spoiler'] = 1; |
|
|
|
|
|
|
|
|
if (isset ($file->hash) && $file->hash) { |
|
|
if (isset ($file->hash) && $file->hash) { |
|
|
$apiPost['md5'] = base64_encode(hex2bin($file->hash)); |
|
|
$apiPost['md5'] = base64_encode(hex2bin($file->hash)); |
|
|
} |
|
|
} |
|
|