diff --git a/src/parsers/Vimeo.php b/src/parsers/Vimeo.php index 767c3e7..a6170e7 100644 --- a/src/parsers/Vimeo.php +++ b/src/parsers/Vimeo.php @@ -54,13 +54,11 @@ public function getVideoInfoWithAPI($id) $response = VideoPlatformsParser::HTTPGet($url); $json = json_decode($response, true); - $json['thumbnail_url'] = str_replace('_295x166', '', $json['thumbnail_url']); - return [ 'id' => $id, - 'title' => $json['title'], + 'title' => ! empty($json['title']) ? $json['title'] : null, 'description' => ! empty($json['description']) ? $json['description'] : null, - 'thumbnail' => ! empty($json['thumbnail_url']) ? $json['thumbnail_url'] : null, + 'thumbnail' => ! empty($json['thumbnail_url']) ? str_replace('_295x166', '', $json['thumbnail_url']) : null, 'duration' => ! empty($json['duration']) ? $json['duration'] : 0, 'api' => true ];