Include thumbnail dimensions
This commit is contained in:
parent
911caadc84
commit
35f7ccb3ba
@ -313,21 +313,24 @@ class DanbooruApi extends Extension {
|
|||||||
continue;
|
continue;
|
||||||
$taglist = $img->get_tag_list();
|
$taglist = $img->get_tag_list();
|
||||||
$owner = $img->get_owner();
|
$owner = $img->get_owner();
|
||||||
|
$previewsize = get_thumbnail_size($img->width, $img->height);
|
||||||
$xml .= xml_tag("post", array(
|
$xml .= xml_tag("post", array(
|
||||||
"id" => $img->id,
|
"id" => $img->id,
|
||||||
"md5" => $img->hash,
|
"md5" => $img->hash,
|
||||||
"file_name" => $img->filename,
|
"file_name" => $img->filename,
|
||||||
"file_url" => $img->get_image_link(),
|
"file_url" => $img->get_image_link(),
|
||||||
"height" => $img->height,
|
"height" => $img->height,
|
||||||
"width" => $img->width,
|
"width" => $img->width,
|
||||||
"preview_url" => $img->get_thumb_link(),
|
"preview_url" => $img->get_thumb_link(),
|
||||||
"rating" => "u",
|
"preview_height" => $previewsize[1],
|
||||||
"date" => $img->posted,
|
"preview_width" => $previewsize[0],
|
||||||
"is_warehoused" => false,
|
"rating" => "u",
|
||||||
"tags" => $taglist,
|
"date" => $img->posted,
|
||||||
"source" => $img->source,
|
"is_warehoused" => false,
|
||||||
"score" => 0,
|
"tags" => $taglist,
|
||||||
"author" => $owner->name
|
"source" => $img->source,
|
||||||
|
"score" => 0,
|
||||||
|
"author" => $owner->name
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
$xml .= "</posts>";
|
$xml .= "</posts>";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user