Properly implemented OG

This commit is contained in:
Pablo Ferreiro 2022-11-26 23:51:45 +01:00
parent ee6e8b0593
commit 215f984fe4
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
16 changed files with 87 additions and 50 deletions

View file

@ -11,8 +11,9 @@ class EmbedController {
$video = $api->video($id);
$video->feed();
if ($video->ok()) {
$data = $video->getFull();
Wrappers::latte('video', new VideoTemplate($data->feed->items[0], $data->info->detail, true));
$item = $video->getFeed()->items[0];
$info = $video->getInfo();
Wrappers::latte('video', new VideoTemplate($item, $info, true));
} else {
ErrorHandler::showMeta($video->error());
}