[grilo-plugins] Extract studio, copyright and certificate
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] Extract studio, copyright and certificate
- Date: Mon, 5 Jul 2010 12:46:58 +0000 (UTC)
commit acf2cc94b27bae521dcf7e178a94682b83e26dea
Author: iain <iain linux intel com>
Date: Wed May 12 16:28:07 2010 +0100
Extract studio, copyright and certificate
src/apple-trailers/grl-apple-trailers.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/apple-trailers/grl-apple-trailers.c b/src/apple-trailers/grl-apple-trailers.c
index 4682b21..ed0ed76 100644
--- a/src/apple-trailers/grl-apple-trailers.c
+++ b/src/apple-trailers/grl-apple-trailers.c
@@ -196,6 +196,10 @@ build_media_from_movie (xmlNodePtr node)
gchar *movie_thumbnail;
gchar *movie_title;
gchar *movie_url;
+ gchar *movie_rating;
+ gchar *movie_studio;
+ gchar *movie_copyright;
+ gchar *movie_license;
media = grl_media_video_new ();
@@ -215,6 +219,9 @@ build_media_from_movie (xmlNodePtr node)
movie_genre = get_node_value (node_dup, "/movieinfo/genre/name");
movie_thumbnail = get_node_value (node_dup, "/movieinfo/poster/location");
movie_url = get_node_value (node_dup, "/movieinfo/preview/large");
+ movie_rating = get_node_value (node_dup, "/movieinfo/info/rating");
+ movie_studio = get_node_value (node_dup, "/movieinfo/info/studio");
+ movie_copyright = get_node_value (node_dup, "/movieinfo/info/copyright");
xmlFreeDoc (xml_doc);
grl_media_set_id (media, movie_id);
@@ -228,6 +235,13 @@ build_media_from_movie (xmlNodePtr node)
movie_genre);
grl_media_set_thumbnail (media, movie_thumbnail);
grl_media_set_url (media, movie_url);
+ grl_media_set_certificate (media, movie_rating);
+ grl_media_set_studio (media, movie_studio);
+
+ /* FIXME: Translation */
+ movie_license = g_strdup_printf ("Copyright %s", movie_copyright);
+ grl_media_set_license (media, movie_license);
+ g_free (movie_license);
g_free (movie_id);
g_free (movie_author);
@@ -238,6 +252,9 @@ build_media_from_movie (xmlNodePtr node)
g_free (movie_genre);
g_free (movie_thumbnail);
g_free (movie_url);
+ g_free (movie_rating);
+ g_free (movie_studio);
+ g_free (movie_copyright);
return media;
}
@@ -409,6 +426,9 @@ grl_apple_trailers_source_supported_keys (GrlMetadataSource *source)
GRL_METADATA_KEY_THUMBNAIL,
GRL_METADATA_KEY_TITLE,
GRL_METADATA_KEY_URL,
+ GRL_METADATA_KEY_CERTIFICATE,
+ GRL_METADATA_KEY_STUDIO,
+ GRL_METADATA_KEY_LICENSE,
NULL);
}
return keys;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]