From a9c44a7e4d015acfd53211d87eb4c59721a8b092 Mon Sep 17 00:00:00 2001 From: git Date: Wed, 26 Jun 2013 10:05:41 -0400 Subject: [PATCH] use vimeo oEmbed API to fix thumbnails --- video_embed_field.handlers.inc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/video_embed_field.handlers.inc b/video_embed_field.handlers.inc index f0824bd..d226f6b 100755 --- a/video_embed_field.handlers.inc +++ b/video_embed_field.handlers.inc @@ -398,12 +398,11 @@ function video_embed_field_handle_vimeo_thumbnail($url) { $info = array( 'id' => $id, ); - $response = drupal_http_request('http://vimeo.com/api/v2/video/' . $id . '.php'); - if (!isset($response->error)) { - $response = unserialize($response->data); - $video = current($response); - $image_url = $video['thumbnail_large']; + $response = drupal_http_request('http://vimeo.com/api/oembed.json?url=http%3A//vimeo.com/'. $id); + if (!isset($response->error)) { + $video = json_decode($response->data, TRUE); + $image_url = $video['thumbnail_url']; $info['url'] = $image_url; } return $info; -- 1.8.0