[grilo-plugins] youtube: Provide all thumbnails



commit a006b4e47b6c6960ca62a1b9866666d7a9a6b96e
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Thu Mar 3 10:54:35 2011 +0100

    youtube: Provide all thumbnails
    
    Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>

 src/youtube/grl-youtube.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/youtube/grl-youtube.c b/src/youtube/grl-youtube.c
index c6dfd2e..29d4e62 100644
--- a/src/youtube/grl-youtube.c
+++ b/src/youtube/grl-youtube.c
@@ -605,6 +605,7 @@ build_media_from_entry (GrlMedia *content,
 			gpointer user_data)
 {
   GDataYouTubeVideo *video;
+  GDataMediaThumbnail *thumbnail;
   GrlMedia *media;
   GList *iter;
   gboolean need_url = FALSE;
@@ -632,11 +633,11 @@ build_media_from_entry (GrlMedia *content,
     } else if (iter->data == GRL_METADATA_KEY_THUMBNAIL) {
       GList *thumb_list;
       thumb_list = gdata_youtube_video_get_thumbnails (video);
-      if (thumb_list) {
-        GDataMediaThumbnail *thumbnail;
+      while (thumb_list) {
         thumbnail = GDATA_MEDIA_THUMBNAIL (thumb_list->data);
-        grl_media_set_thumbnail (media,
+        grl_media_add_thumbnail (media,
                                  gdata_media_thumbnail_get_uri (thumbnail));
+        thumb_list = g_list_next (thumb_list);
       }
     } else if (iter->data == GRL_METADATA_KEY_DATE) {
       GTimeVal date;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]