Switched back to previous random method for Danbooru.
This commit is contained in:
parent
f491be9eba
commit
e8edf8b5f3
1 changed files with 3 additions and 2 deletions
|
@ -20,13 +20,14 @@ class DanbooruSource implements IBooruSource {
|
|||
}
|
||||
|
||||
public function getPosts(string $tags, bool $random = true, int $limit = 20): array {
|
||||
if($random)
|
||||
$tags .= ' order:random';
|
||||
|
||||
$params = [];
|
||||
if($tags !== '')
|
||||
$params['tags'] = $tags;
|
||||
if($limit > 0)
|
||||
$params['limit'] = $limit;
|
||||
if($random)
|
||||
$params['random'] = '1';
|
||||
|
||||
$url = self::POSTS_URL;
|
||||
if(!empty($params))
|
||||
|
|
Reference in a new issue