1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-31 13:50:23 +02:00

[Vk2Bridge] Handling albums (#4163)

This commit is contained in:
Eugene Molotov
2024-07-29 01:34:12 +05:00
committed by GitHub
parent bba225dfe8
commit d28a0fd94b

View File

@@ -168,6 +168,12 @@ class Vk2Bridge extends BridgeAbstract
$ret .= "* {$text}: {$votes} ({$rate}%)<br />";
}
$ret .= '</p>';
} elseif ($attachment['type'] == 'album') {
$album = $attachment['album'];
$url = "https://vk.com/album{$album['owner_id']}_{$album['id']}";
$title = 'Альбом: ' . $album['title'];
$photo = $this->getImageURLWithLargestWidth($album['thumb']['sizes']);
$ret .= "<p><a href='{$url}'><img src='{$photo}' alt='{$title}'><br>{$title}</a></p>";
} elseif (!in_array($attachment['type'], ['video', 'audio', 'doc'])) {
$ret .= "<p>Unknown attachment type: {$attachment['type']}</p>";
}