[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
1 changed files with 5 additions and 5 deletions

View File

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