[VkBridge] Correct fallback behavior, when trying to get direct video links (#1670)

This commit is contained in:
Eugene Molotov 2020-07-31 15:29:18 +05:00 committed by GitHub
parent f5916a2f74
commit 7709b8d662
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -423,12 +423,12 @@ class VkBridge extends BridgeAbstract
'count' => 200 'count' => 200
)); ));
if (isset($result['error'])) return; if (!isset($result['error'])) {
foreach($result['response']['items'] as $item) { foreach($result['response']['items'] as $item) {
$video_id = strval($item['owner_id']) . '_' . strval($item['id']); $video_id = strval($item['owner_id']) . '_' . strval($item['id']);
$this->videos[$video_id]['url'] = $item['player']; $this->videos[$video_id]['url'] = $item['player'];
} }
}
foreach($this->items as &$item) { foreach($this->items as &$item) {
foreach($item['videos'] as $video_id) { foreach($item['videos'] as $video_id) {