MDL-28510 repository_youtube Use smaller thumbnails in search results
authorMark Johnson <mark.johnson@tauntons.ac.uk>
Thu, 28 Jul 2011 12:43:38 +0000 (13:43 +0100)
committerSam Hemelryk <sam.hemelryk@gmail.com>
Tue, 2 Aug 2011 05:36:45 +0000 (13:36 +0800)
repository/youtube/lib.php

index a845f16..67166df 100644 (file)
@@ -57,7 +57,7 @@ class repository_youtube extends repository {
         foreach ($xml->entry as $entry) {
             $media = $entry->children('http://search.yahoo.com/mrss/');
             $title = $media->group->title;
-            $attrs = $media->group->thumbnail->attributes();
+            $attrs = $media->group->thumbnail[2]->attributes();
             $thumbnail = $attrs['url'];
             $arr = explode('/', $entry->id);
             $id = $arr[count($arr)-1];