aboutsummaryrefslogtreecommitdiff
path: root/bridges/SafebooruBridge.php
blob: b0ebea19f25c86306f0c3c0148accdde4b7fe536 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php

class SafebooruBridge extends GelbooruBridge
{
    const MAINTAINER = 'mitsukarenai';
    const NAME = 'Safebooru';
    const URI = 'https://safebooru.org/';
    const DESCRIPTION = 'Returns images from given page';

    protected function buildThumbnailURI($element)
    {
        $regex = '/\.\w+$/';
        return $this->getURI() . 'thumbnails/' . $element->directory
        . '/thumbnail_' . preg_replace($regex, '.jpg', $element->image);
    }
}