Add item dimensions (width x height) and source URL (if it exists in JSON) (#3135)

This commit is contained in:
quickwick 2022-11-08 09:43:51 -08:00 committed by GitHub
parent 86c3a969b8
commit 00ff0890bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -64,8 +64,12 @@ class GelbooruBridge extends BridgeAbstract
} }
$item['content'] = '<a href="' . $item['uri'] . '"><img src="' $item['content'] = '<a href="' . $item['uri'] . '"><img src="'
. $thumbnailUri . '" /></a><br><br><b>Tags:</b> ' . $thumbnailUri . '" /></a><br><br><b>Dimensions:</b> '
. $item['tags'] . '<br><br>' . $item['timestamp']; . strval($element->width) . ' x ' . strval($element->height) . '<br><br><b>Tags:</b> '
. $item['tags'];
if (!is_null($element->source)) {
$item['content'] .= '<br><br><b>Source: </b><a href="' . $element->source . '">' . $element->source . '</a>';
}
return $item; return $item;
} }