[multivalued in grilo-plugins (v3) 3/3] youtube: Provide all thumbnails
- From: "Juan A. Suarez Romero" <jasuarez igalia com>
- To: grilo-list gnome org
- Subject: [multivalued in grilo-plugins (v3) 3/3] youtube: Provide all thumbnails
- Date: Thu, 3 Mar 2011 13:38:35 +0100
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;
--
1.7.1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]