Include thumbnail dimensions

This commit is contained in:
vomitcuddle 2013-06-18 22:21:56 +01:00
parent 911caadc84
commit 35f7ccb3ba

View File

@ -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>";