[multivalued in grilo (v3) 5/5] core: Add convenience API in GrlMediaFoo



Add some utilities in GrlMedia clases to handle multi-valued elements in those
keys that could make sense, as well as to handle correlated keys without
needing to create or handle GrlRelatedKeys.

Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>
---
 src/data/grl-media-audio.c |  263 ++++++++++++++++++++++---
 src/data/grl-media-audio.h |   40 +++-
 src/data/grl-media-image.c |  142 ++++++++++++--
 src/data/grl-media-image.h |   31 +++-
 src/data/grl-media-video.c |  178 +++++++++++++++--
 src/data/grl-media-video.h |   39 +++-
 src/data/grl-media.c       |  473 ++++++++++++++++++++++++++++++++------------
 src/data/grl-media.h       |  108 +++++++----
 8 files changed, 1028 insertions(+), 246 deletions(-)

diff --git a/src/data/grl-media-audio.c b/src/data/grl-media-audio.c
index fcdd219..bde2ee6 100644
--- a/src/data/grl-media-audio.c
+++ b/src/data/grl-media-audio.c
@@ -84,7 +84,7 @@ grl_media_audio_new (void)
 
 /**
  * grl_media_audio_set_artist:
- * @data: the media instance
+ * @audio: the media instance
  * @artist: the audio's artist
  *
  * Set the artist of the audio
@@ -92,15 +92,15 @@ grl_media_audio_new (void)
  * Since: 0.1.4
  */
 void
-grl_media_audio_set_artist (GrlMediaAudio *data, const gchar *artist)
+grl_media_audio_set_artist (GrlMediaAudio *audio, const gchar *artist)
 {
-  grl_data_set_string (GRL_DATA (data), GRL_METADATA_KEY_ARTIST,
+  grl_data_set_string (GRL_DATA (audio), GRL_METADATA_KEY_ARTIST,
                        artist);
 }
 
 /**
  * grl_media_audio_set_album:
- * @data: the media instance
+ * @audio: the media instance
  * @album: the audio's album
  *
  * Set the album of the audio
@@ -108,15 +108,15 @@ grl_media_audio_set_artist (GrlMediaAudio *data, const gchar *artist)
  * Since: 0.1.4
  */
 void
-grl_media_audio_set_album (GrlMediaAudio *data, const gchar *album)
+grl_media_audio_set_album (GrlMediaAudio *audio, const gchar *album)
 {
-  grl_data_set_string (GRL_DATA (data), GRL_METADATA_KEY_ALBUM,
+  grl_data_set_string (GRL_DATA (audio), GRL_METADATA_KEY_ALBUM,
                        album);
 }
 
 /**
  * grl_media_audio_set_genre:
- * @data: the media instance
+ * @audio: the media instance
  * @genre: the audio's genre
  *
  * Set the genre of the audio
@@ -124,15 +124,15 @@ grl_media_audio_set_album (GrlMediaAudio *data, const gchar *album)
  * Since: 0.1.4
  */
 void
-grl_media_audio_set_genre (GrlMediaAudio *data, const gchar *genre)
+grl_media_audio_set_genre (GrlMediaAudio *audio, const gchar *genre)
 {
-  grl_data_set_string (GRL_DATA (data), GRL_METADATA_KEY_GENRE,
+  grl_data_set_string (GRL_DATA (audio), GRL_METADATA_KEY_GENRE,
                        genre);
 }
 
 /**
  * grl_media_audio_set_lyrics:
- * @data: the media instance
+ * @audio: the media instance
  * @lyrics: the audio's lyrics
  *
  * Set the lyrics of the audio
@@ -140,15 +140,15 @@ grl_media_audio_set_genre (GrlMediaAudio *data, const gchar *genre)
  * Since: 0.1.4
  */
 void
-grl_media_audio_set_lyrics (GrlMediaAudio *data, const gchar *lyrics)
+grl_media_audio_set_lyrics (GrlMediaAudio *audio, const gchar *lyrics)
 {
-  grl_data_set_string (GRL_DATA (data), GRL_METADATA_KEY_LYRICS,
+  grl_data_set_string (GRL_DATA (audio), GRL_METADATA_KEY_LYRICS,
                        lyrics);
 }
 
 /**
  * grl_media_audio_set_bitrate:
- * @data: the media instance
+ * @audio: the media instance
  * @bitrate: the audio's bitrate
  *
  * Set the bitrate of the audio
@@ -156,78 +156,281 @@ grl_media_audio_set_lyrics (GrlMediaAudio *data, const gchar *lyrics)
  * Since: 0.1.4
  */
 void
-grl_media_audio_set_bitrate (GrlMediaAudio *data, gint bitrate)
+grl_media_audio_set_bitrate (GrlMediaAudio *audio, gint bitrate)
 {
-  grl_data_set_int (GRL_DATA (data), GRL_METADATA_KEY_BITRATE,
+  grl_data_set_int (GRL_DATA (audio), GRL_METADATA_KEY_BITRATE,
                     bitrate);
 }
 
 /**
+ * grl_media_audio_set_url_data:
+ * @audio: the media instance
+ * @url: the audio's url
+ * @mime: the @url mime-type
+ * @bitrate: the @url bitrate, or -1 to ignore
+ *
+ * Sets all the keys related with the URL of an audio resource in one go.
+ **/
+void
+grl_media_audio_set_url_data (GrlMediaAudio *audio,
+                              const gchar *url,
+                              const gchar *mime,
+                              gint bitrate)
+{
+  GrlRelatedKeys *relkeys = grl_related_keys_new ();
+  grl_related_keys_set_string (relkeys, GRL_METADATA_KEY_URL, url);
+  grl_related_keys_set_string (relkeys, GRL_METADATA_KEY_MIME, mime);
+  if (bitrate >= 0) {
+    grl_related_keys_set_int (relkeys, GRL_METADATA_KEY_BITRATE, bitrate);
+  }
+  grl_data_set_related_keys (GRL_DATA (audio), relkeys, 0);
+}
+
+/**
+ * grl_media_audio_add_artist:
+ * @audio: the media instance
+ * @artist: an audio's artist
+ *
+ * Adds a new artist to @audio.
+ **/
+void
+grl_media_audio_add_artist (GrlMediaAudio *audio, const gchar *artist)
+{
+  grl_data_add_string (GRL_DATA (audio), GRL_METADATA_KEY_ARTIST, artist);
+}
+
+/**
+ * grl_media_audio_add_genre:
+ * @audio: the media instance
+ * @genre: an audio's genre
+ *
+ * Adds a new genre to @audio.
+ **/
+void
+grl_media_audio_add_genre (GrlMediaAudio *audio, const gchar *genre)
+{
+  grl_data_add_string (GRL_DATA (audio), GRL_METADATA_KEY_GENRE, genre);
+}
+
+/**
+ * grl_media_audio_add_lyrics:
+ * @audio: the media instance
+ * @lyrics: an audio's lyrics
+ *
+ * Adds a new lyrics to @audio.
+ **/
+void
+grl_media_audio_add_lyrics (GrlMediaAudio *audio, const gchar *lyrics)
+{
+  grl_data_add_string (GRL_DATA (audio), GRL_METADATA_KEY_LYRICS, lyrics);
+}
+
+/**
+ * grl_media_audio_add_url_data:
+ * @audio: the media instance
+ * @url: an audio's url
+ * @mime: the @url mime-type
+ * @bitrate: the @url bitrate, or -1 to ignore
+ *
+ * Sets all the keys related with the URL of a media resource and adds it to
+ * @audio (useful for resources with more than one URL).
+ **/
+void
+grl_media_audio_add_url_data (GrlMediaAudio *audio,
+                              const gchar *url,
+                              const gchar *mime,
+                              gint bitrate)
+{
+  GrlRelatedKeys *relkeys = grl_related_keys_new ();
+  grl_related_keys_set_string (relkeys, GRL_METADATA_KEY_URL, url);
+  grl_related_keys_set_string (relkeys, GRL_METADATA_KEY_MIME, mime);
+  if (bitrate >= 0) {
+    grl_related_keys_set_int (relkeys, GRL_METADATA_KEY_BITRATE, bitrate);
+  }
+  grl_data_add_related_keys (GRL_DATA (audio), relkeys);
+}
+
+/**
  * grl_media_audio_get_artist:
- * @data: the media instance
+ * @audio: the media instance
  *
  * Returns: the artist of the audio
  *
  * Since: 0.1.4
  */
 const gchar *
-grl_media_audio_get_artist (GrlMediaAudio *data)
+grl_media_audio_get_artist (GrlMediaAudio *audio)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_ARTIST);
+  return grl_data_get_string (GRL_DATA (audio), GRL_METADATA_KEY_ARTIST);
+}
+
+/**
+ * grl_media_audio_get_artist_nth:
+ * @audio: the media instance
+ * @index: element to retrieve, starting at 0
+ *
+ * Returns: the n-th artist of the audio
+ */
+const gchar *
+grl_media_audio_get_artist_nth (GrlMediaAudio *audio, guint index)
+{
+  GrlRelatedKeys *relkeys =
+    grl_data_get_related_keys (GRL_DATA (audio),
+                               GRL_METADATA_KEY_ARTIST,
+                               index);
+
+  if (!relkeys) {
+    return NULL;
+  } else {
+    return grl_related_keys_get_string (relkeys, GRL_METADATA_KEY_ARTIST);
+  }
 }
 
 /**
  * grl_media_audio_get_album:
- * @data: the media instance
+ * @audio: the media instance
  *
  * Returns: the album of the audio
  *
  * Since: 0.1.4
  */
 const gchar *
-grl_media_audio_get_album (GrlMediaAudio *data)
+grl_media_audio_get_album (GrlMediaAudio *audio)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_ALBUM);
+  return grl_data_get_string (GRL_DATA (audio), GRL_METADATA_KEY_ALBUM);
 }
 
 /**
  * grl_media_audio_get_genre:
- * @data: the media instance
+ * @audio: the media instance
  *
  * Returns: the genre of the audio
  *
  * Since: 0.1.4
  */
 const gchar *
-grl_media_audio_get_genre (GrlMediaAudio *data)
+grl_media_audio_get_genre (GrlMediaAudio *audio)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_GENRE);
+  return grl_data_get_string (GRL_DATA (audio), GRL_METADATA_KEY_GENRE);
+}
+
+/**
+ * grl_media_audio_get_genre_nth:
+ * @audio: the media instance
+ * @index: element to retrieve, starting at 0
+ *
+ * Returns: the n-th genre of the audio
+ */
+const gchar *
+grl_media_audio_get_genre_nth (GrlMediaAudio *audio, guint index)
+{
+  GrlRelatedKeys *relkeys =
+    grl_data_get_related_keys (GRL_DATA (audio), GRL_METADATA_KEY_GENRE, index);
+
+  if (!relkeys) {
+    return NULL;
+  } else {
+    return grl_related_keys_get_string (relkeys, GRL_METADATA_KEY_GENRE);
+  }
 }
 
 /**
  * grl_media_audio_get_lyrics:
- * @data: the media instance
+ * @audio: the media instance
  *
  * Returns: the lyrics of the audio
  *
  * Since: 0.1.4
  */
 const gchar *
-grl_media_audio_get_lyrics (GrlMediaAudio *data)
+grl_media_audio_get_lyrics (GrlMediaAudio *audio)
+{
+  return grl_data_get_string (GRL_DATA (audio), GRL_METADATA_KEY_LYRICS);
+}
+
+/**
+ * grl_media_audio_get_lyrics_nth:
+ * @audio: the media instance
+ * @index: element to retrieve, starting at 0
+ *
+ * Returns: the n-th lyrics of the audio
+ */
+const gchar *
+grl_media_audio_get_lyrics_nth (GrlMediaAudio *audio, guint index)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_LYRICS);
+  GrlRelatedKeys *relkeys =
+    grl_data_get_related_keys (GRL_DATA (audio),
+                               GRL_METADATA_KEY_LYRICS,
+                               index);
+
+  if (!relkeys) {
+    return NULL;
+  } else {
+    return grl_related_keys_get_string (relkeys, GRL_METADATA_KEY_LYRICS);
+  }
 }
 
 /**
  * grl_media_audio_get_bitrate:
- * @data: the media instance
+ * @audio: the media instance
  *
  * Returns: the bitrate of the audio
  *
  * Since: 0.1.4
  */
 gint
-grl_media_audio_get_bitrate (GrlMediaAudio *data)
+grl_media_audio_get_bitrate (GrlMediaAudio *audio)
+{
+  return grl_data_get_int (GRL_DATA (audio), GRL_METADATA_KEY_BITRATE);
+}
+
+/**
+ * grl_media_audio_get_url_data:
+ * @audio: the media instance
+ * @mime: (out) (transfer none): the url mime-type, or %NULL to ignore
+ * @bitrate: (out): the url bitrate, or %NULL to ignore
+ *
+ * Returns: all the keys related with the URL of an audio resource in one go.
+ */
+const gchar *
+grl_media_audio_get_url_data (GrlMediaAudio *audio,
+                              gchar **mime,
+                              gint *bitrate)
 {
-  return grl_data_get_int (GRL_DATA (data), GRL_METADATA_KEY_BITRATE);
+  return grl_media_audio_get_url_data_nth (audio, 0, mime, bitrate);
+}
+
+/**
+ * grl_media_audio_get_url_data_nth:
+ * @audio: the media instance
+ * @index: element to retrieve, starting at 0
+ * @mime: (out) (transfer none): the url mime-type, or %NULL to ignore
+ * @bitrate: (out): the url bitrate, or %NULL to ignore
+ *
+ * Returns: all the keys related with the URL number @index of an audio resource
+ * in one go.
+ */
+const gchar *
+grl_media_audio_get_url_data_nth (GrlMediaAudio *audio,
+                                  guint index,
+                                  gchar **mime,
+                                  gint *bitrate)
+{
+  GrlRelatedKeys *relkeys =
+    grl_data_get_related_keys (GRL_DATA (audio), GRL_METADATA_KEY_URL, index);
+
+  if (!relkeys) {
+    return NULL;
+  }
+
+  if (mime) {
+    *mime = (gchar *) grl_related_keys_get_string (relkeys,
+                                                   GRL_METADATA_KEY_MIME);
+  }
+
+  if (bitrate) {
+    *bitrate = grl_related_keys_get_int (relkeys, GRL_METADATA_KEY_BITRATE);
+  }
+
+  return grl_related_keys_get_string (relkeys, GRL_METADATA_KEY_URL);
 }
diff --git a/src/data/grl-media-audio.h b/src/data/grl-media-audio.h
index d9ee343..3c8066c 100644
--- a/src/data/grl-media-audio.h
+++ b/src/data/grl-media-audio.h
@@ -85,25 +85,45 @@ struct _GrlMediaAudio
   gpointer _grl_reserved[GRL_PADDING_SMALL];
 };
 
-void grl_media_audio_set_artist (GrlMediaAudio *data, const gchar *artist);
+void grl_media_audio_set_artist (GrlMediaAudio *audio, const gchar *artist);
 
-void grl_media_audio_set_album (GrlMediaAudio *data, const gchar *album);
+void grl_media_audio_set_album (GrlMediaAudio *audio, const gchar *album);
 
-void grl_media_audio_set_genre (GrlMediaAudio *data, const gchar *genre);
+void grl_media_audio_set_genre (GrlMediaAudio *audio, const gchar *genre);
 
-void grl_media_audio_set_lyrics (GrlMediaAudio *data, const gchar *lyrics);
+void grl_media_audio_set_lyrics (GrlMediaAudio *audio, const gchar *lyrics);
 
-void grl_media_audio_set_bitrate (GrlMediaAudio *data, gint bitrate);
+void grl_media_audio_set_bitrate (GrlMediaAudio *audio, gint bitrate);
 
-const gchar *grl_media_audio_get_artist (GrlMediaAudio *data);
+void grl_media_audio_set_url_data (GrlMediaAudio *audio, const gchar *url, const gchar *mime, gint bitrate);
 
-const gchar *grl_media_audio_get_album (GrlMediaAudio *data);
+void grl_media_audio_add_artist (GrlMediaAudio *audio, const gchar *artist);
 
-const gchar *grl_media_audio_get_genre (GrlMediaAudio *data);
+void grl_media_audio_add_genre (GrlMediaAudio *audio, const gchar *genre);
 
-const gchar *grl_media_audio_get_lyrics (GrlMediaAudio *data);
+void grl_media_audio_add_lyrics (GrlMediaAudio *audio, const gchar *lyrics);
 
-gint grl_media_audio_get_bitrate (GrlMediaAudio *data);
+void grl_media_audio_add_url_data (GrlMediaAudio *audio, const gchar *url, const gchar *mime, gint bitrate);
+
+const gchar *grl_media_audio_get_artist (GrlMediaAudio *audio);
+
+const gchar *grl_media_audio_get_artist_nth (GrlMediaAudio *audio, guint index);
+
+const gchar *grl_media_audio_get_album (GrlMediaAudio *audio);
+
+const gchar *grl_media_audio_get_genre (GrlMediaAudio *audio);
+
+const gchar *grl_media_audio_get_genre_nth (GrlMediaAudio *audio, guint index);
+
+const gchar *grl_media_audio_get_lyrics (GrlMediaAudio *audio);
+
+const gchar *grl_media_audio_get_lyrics_nth (GrlMediaAudio *audio, guint index);
+
+gint grl_media_audio_get_bitrate (GrlMediaAudio *audio);
+
+const gchar *grl_media_audio_get_url_data (GrlMediaAudio *audio, gchar **mime, gint *bitrate);
+
+const gchar *grl_media_audio_get_url_data_nth (GrlMediaAudio *audio, guint index, gchar **mime, gint *bitrate);
 
 GType grl_media_audio_get_type (void) G_GNUC_CONST;
 
diff --git a/src/data/grl-media-image.c b/src/data/grl-media-image.c
index 2049474..3fa32a4 100644
--- a/src/data/grl-media-image.c
+++ b/src/data/grl-media-image.c
@@ -103,7 +103,7 @@ grl_media_image_set_size (GrlMediaImage *image,
 
 /**
  * grl_media_image_set_width:
- * @data: the image instance
+ * @image: the image instance
  * @width: the image's width
  *
  * Set the width of the image
@@ -111,16 +111,16 @@ grl_media_image_set_size (GrlMediaImage *image,
  * Since: 0.1.4
  */
 void
-grl_media_image_set_width (GrlMediaImage *data, gint width)
+grl_media_image_set_width (GrlMediaImage *image, gint width)
 {
-  grl_data_set_int (GRL_DATA (data),
+  grl_data_set_int (GRL_DATA (image),
                     GRL_METADATA_KEY_WIDTH,
                     width);
 }
 
 /**
  * grl_media_image_set_height:
- * @data: the image instance
+ * @image: the image instance
  * @height: the image's height
  *
  * Set the height of the image
@@ -128,37 +128,155 @@ grl_media_image_set_width (GrlMediaImage *data, gint width)
  * Since: 0.1.4
  */
 void
-grl_media_image_set_height (GrlMediaImage *data, gint height)
+grl_media_image_set_height (GrlMediaImage *image, gint height)
 {
-  grl_data_set_int (GRL_DATA (data),
+  grl_data_set_int (GRL_DATA (image),
                     GRL_METADATA_KEY_HEIGHT,
                     height);
 }
 
 /**
+ * grl_media_image_set_url_data:
+ * @image: the media instance
+ * @url: the image's url
+ * @mime: image mime-type
+ * @width: image width, or -1 to ignore
+ * @height: image height, or -1 to ignore
+ *
+ * Sets all the keys related with the URL of an image resource in one go.
+ **/
+void
+grl_media_image_set_url_data (GrlMediaImage *image,
+                              const gchar *url,
+                              const gchar *mime,
+                              gint width,
+                              gint height)
+{
+  GrlRelatedKeys *relkeys = grl_related_keys_new ();
+  grl_related_keys_set_string (relkeys, GRL_METADATA_KEY_URL, url);
+  grl_related_keys_set_string (relkeys, GRL_METADATA_KEY_MIME, mime);
+  if (width >= 0) {
+    grl_related_keys_set_int (relkeys, GRL_METADATA_KEY_WIDTH, width);
+  }
+  if (height >= 0) {
+    grl_related_keys_set_int (relkeys, GRL_METADATA_KEY_HEIGHT, height);
+  }
+  grl_data_set_related_keys (GRL_DATA (image), relkeys, 0);
+}
+
+/**
+ * grl_media_image_add_url_data:
+ * @image: the image instance
+ * @url: a image's url
+ * @mime: image mime-type
+ * @width: image width, or -1 to ignore
+ * @height: image height, or -1 to ignore
+ *
+ * Sets all the keys related with the URL of a media resource and adds it to
+ * @image (useful for resources with more than one URL).
+ **/
+void
+grl_media_image_add_url_data (GrlMediaImage *image,
+                              const gchar *url,
+                              const gchar *mime,
+                              gint width,
+                              gint height)
+{
+  GrlRelatedKeys *relkeys = grl_related_keys_new ();
+  grl_related_keys_set_string (relkeys, GRL_METADATA_KEY_URL, url);
+  grl_related_keys_set_string (relkeys, GRL_METADATA_KEY_MIME, mime);
+  if (width >= 0) {
+    grl_related_keys_set_int (relkeys, GRL_METADATA_KEY_WIDTH, width);
+  }
+  if (height >= 0) {
+    grl_related_keys_set_int (relkeys, GRL_METADATA_KEY_HEIGHT, height);
+  }
+  grl_data_add_related_keys (GRL_DATA (image), relkeys);
+}
+
+/**
  * grl_media_image_get_width:
- * @data: The image instance
+ * @image: The image instance
  *
  * Returns: the width of the image
  *
  * Since: 0.1.4
  */
 gint
-grl_media_image_get_width (GrlMediaImage *data)
+grl_media_image_get_width (GrlMediaImage *image)
 {
-  return grl_data_get_int (GRL_DATA (data), GRL_METADATA_KEY_WIDTH);
+  return grl_data_get_int (GRL_DATA (image), GRL_METADATA_KEY_WIDTH);
 }
 
 /**
  * grl_media_image_get_height:
- * @data: the image instance
+ * @image: the image instance
  *
  * Returns: the height of the image
  *
  * Since: 0.1.4
  */
 gint
-grl_media_image_get_height (GrlMediaImage *data)
+grl_media_image_get_height (GrlMediaImage *image)
 {
-  return grl_data_get_int (GRL_DATA (data), GRL_METADATA_KEY_HEIGHT);
+  return grl_data_get_int (GRL_DATA (image), GRL_METADATA_KEY_HEIGHT);
+}
+
+/**
+ * grl_media_image_get_url_data:
+ * @image: the image instance
+ * @mime: (out) (transfer none): the url mime-type, or %NULL to ignore
+ * @width: the width, or %NULL to ignore
+ * @height: the height, or %NULL to ignore
+ *
+ * Returns: all the keys related with the URL of an image resource in one go.
+ **/
+const gchar *
+grl_media_image_get_url_data (GrlMediaImage *image,
+                              gchar **mime,
+                              gint *width,
+                              gint *height)
+{
+  return grl_media_image_get_url_data_nth (image, 0, mime, width, height);
+}
+
+/**
+ * grl_media_image_get_url_data_nth:
+ * @image: the image instance
+ * @index: element to retrieve
+ * @mime: (out) (transfer none): the url mime-type, or %NULL to ignore
+ * @width: the width, or %NULL to ignore
+ * @height: the height, or %NULL to ignore
+ *
+ * Returns: all the keys related with the URL number @index of an image resource
+ * in one go.
+ **/
+const gchar *
+grl_media_image_get_url_data_nth (GrlMediaImage *image,
+                                  guint index,
+                                  gchar **mime,
+                                  gint *width,
+                                  gint *height)
+{
+  GrlRelatedKeys *relkeys =
+    grl_data_get_related_keys (GRL_DATA (image), GRL_METADATA_KEY_URL, index);
+
+  if (!relkeys) {
+    return NULL;
+  }
+
+  if (mime) {
+    *mime = (gchar *) grl_related_keys_get_string (relkeys,
+                                                   GRL_METADATA_KEY_MIME);
+  }
+
+  if (width) {
+    *width = grl_related_keys_get_int (relkeys, GRL_METADATA_KEY_WIDTH);
+  }
+
+  if (height) {
+    *height = grl_related_keys_get_int (relkeys, GRL_METADATA_KEY_HEIGHT);
+  }
+
+  return grl_related_keys_get_string (relkeys, GRL_METADATA_KEY_URL);
 }
diff --git a/src/data/grl-media-image.h b/src/data/grl-media-image.h
index 2dd4269..f9bc390 100644
--- a/src/data/grl-media-image.h
+++ b/src/data/grl-media-image.h
@@ -85,13 +85,13 @@ struct _GrlMediaImage
   gpointer _grl_reserved[GRL_PADDING_SMALL];
 };
 
-void grl_media_image_set_width (GrlMediaImage *data, gint width);
+void grl_media_image_set_width (GrlMediaImage *image, gint width);
 
-void grl_media_image_set_height (GrlMediaImage *data, gint height);
+void grl_media_image_set_height (GrlMediaImage *image, gint height);
 
-gint grl_media_image_get_width (GrlMediaImage *data);
+gint grl_media_image_get_width (GrlMediaImage *image);
 
-gint grl_media_image_get_height (GrlMediaImage *data);
+gint grl_media_image_get_height (GrlMediaImage *image);
 
 GType grl_media_image_get_type (void) G_GNUC_CONST;
 GrlMedia *grl_media_image_new (void);
@@ -99,6 +99,29 @@ void grl_media_image_set_size (GrlMediaImage *image,
                                gint width,
                                gint height);
 
+const gchar *grl_media_image_get_url_data (GrlMediaImage *image,
+                                           gchar **mime,
+                                           gint *width,
+                                           gint *height);
+
+const gchar *grl_media_image_get_url_data_nth (GrlMediaImage *image,
+                                               guint index,
+                                               gchar **mime,
+                                               gint *width,
+                                               gint *height);
+
+void grl_media_image_set_url_data (GrlMediaImage *image,
+                                   const gchar *url,
+                                   const gchar *mime,
+                                   gint width,
+                                   gint height);
+
+void grl_media_image_add_url_data (GrlMediaImage *image,
+                                   const gchar *url,
+                                   const gchar *mime,
+                                   gint width,
+                                   gint height);
+
 G_END_DECLS
 
 #endif /* _GRL_MEDIA_IMAGE_H_ */
diff --git a/src/data/grl-media-video.c b/src/data/grl-media-video.c
index b957dad..d93ed3b 100644
--- a/src/data/grl-media-video.c
+++ b/src/data/grl-media-video.c
@@ -103,7 +103,7 @@ grl_media_video_set_size (GrlMediaVideo *video,
 
 /**
  * grl_media_video_set_width:
- * @data: the media instance
+ * @video: the media instance
  * @width: the video's width
  *
  * Set the width of the video
@@ -111,16 +111,16 @@ grl_media_video_set_size (GrlMediaVideo *video,
  * Since: 0.1.4
  */
 void
-grl_media_video_set_width (GrlMediaVideo *data, gint width)
+grl_media_video_set_width (GrlMediaVideo *video, gint width)
 {
-  grl_data_set_int (GRL_DATA (data),
+  grl_data_set_int (GRL_DATA (video),
                     GRL_METADATA_KEY_WIDTH,
                     width);
 }
 
 /**
  * grl_media_video_set_height:
- * @data: the media instance
+ * @video: the media instance
  * @height: the video's height
  *
  * Set the height of the video
@@ -128,16 +128,16 @@ grl_media_video_set_width (GrlMediaVideo *data, gint width)
  * Since: 0.1.4
  */
 void
-grl_media_video_set_height (GrlMediaVideo *data, gint height)
+grl_media_video_set_height (GrlMediaVideo *video, gint height)
 {
-  grl_data_set_int (GRL_DATA (data),
+  grl_data_set_int (GRL_DATA (video),
                     GRL_METADATA_KEY_HEIGHT,
                     height);
 }
 
 /**
  * grl_media_video_set_framerate:
- * @data: the media instance
+ * @video: the media instance
  * @framerate: the video's framerate
  *
  * Set the framerate of the video
@@ -145,51 +145,193 @@ grl_media_video_set_height (GrlMediaVideo *data, gint height)
  * Since: 0.1.4
  */
 void
-grl_media_video_set_framerate (GrlMediaVideo *data, gfloat framerate)
+grl_media_video_set_framerate (GrlMediaVideo *video, gfloat framerate)
 {
-  grl_data_set_float (GRL_DATA (data),
+  grl_data_set_float (GRL_DATA (video),
                       GRL_METADATA_KEY_FRAMERATE,
                       framerate);
 }
 
 /**
  * grl_media_video_get_width:
- * @data: the media instance
+ * @video: the media instance
  *
  * Returns: the width of the video
  *
  * Since: 0.1.4
  */
 gint
-grl_media_video_get_width (GrlMediaVideo *data)
+grl_media_video_get_width (GrlMediaVideo *video)
 {
-  return grl_data_get_int (GRL_DATA (data), GRL_METADATA_KEY_WIDTH);
+  return grl_data_get_int (GRL_DATA (video), GRL_METADATA_KEY_WIDTH);
 }
 
 /**
  * grl_media_video_get_height:
- * @data: the media instance
+ * @video: the media instance
  *
  * Returns: the height of the video
  *
  * Since: 0.1.4
  */
 gint
-grl_media_video_get_height (GrlMediaVideo *data)
+grl_media_video_get_height (GrlMediaVideo *video)
 {
-  return grl_data_get_int (GRL_DATA (data), GRL_METADATA_KEY_HEIGHT);
+  return grl_data_get_int (GRL_DATA (video), GRL_METADATA_KEY_HEIGHT);
 }
 
 /**
  * grl_media_video_get_framerate:
- * @data: the media instance
+ * @video: the media instance
  *
  * Returns: the framerate of the video
  *
  * Since: 0.1.4
  */
 gfloat
-grl_media_video_get_framerate (GrlMediaVideo *data)
+grl_media_video_get_framerate (GrlMediaVideo *video)
+{
+  return grl_data_get_float (GRL_DATA (video), GRL_METADATA_KEY_FRAMERATE);
+}
+
+/**
+ * grl_media_video_set_url_data:
+ * @video: the media instance
+ * @url: the video's url
+ * @mime: video mime-type
+ * @framerate: video framerate, or -1 to ignore
+ * @width: video width, or -1 to ignore
+ * @height: video height, or -1 to ignore
+ *
+ * Sets all the keys related with the URL of a video resource in one go.
+ **/
+void
+grl_media_video_set_url_data (GrlMediaVideo *video,
+                              const gchar *url,
+                              const gchar *mime,
+                              gfloat framerate,
+                              gint width,
+                              gint height)
+{
+  GrlRelatedKeys *relkeys = grl_related_keys_new ();
+  grl_related_keys_set_string (relkeys, GRL_METADATA_KEY_URL, url);
+  grl_related_keys_set_string (relkeys, GRL_METADATA_KEY_MIME, mime);
+  if (framerate >= 0) {
+    grl_related_keys_set_float (relkeys, GRL_METADATA_KEY_FRAMERATE, framerate);
+  }
+  if (width >= 0) {
+    grl_related_keys_set_int (relkeys, GRL_METADATA_KEY_WIDTH, width);
+  }
+  if (height >= 0) {
+    grl_related_keys_set_int (relkeys, GRL_METADATA_KEY_HEIGHT, height);
+  }
+  grl_data_set_related_keys (GRL_DATA (video), relkeys, 0);
+}
+
+/**
+ * grl_media_video_add_url_data:
+ * @video: the media instance
+ * @url: a video's url
+ * @mime: video mime-type
+ * @framerate: video framerate, or -1 to ignore
+ * @width: video width, or -1 to ignore
+ * @height: video height, or -1 to ignore
+ *
+ * Sets all the keys related with the URL of a media resource and adds it to
+ * @video (useful for resources with more than one URL).
+ **/
+void
+grl_media_video_add_url_data (GrlMediaVideo *video,
+                              const gchar *url,
+                              const gchar *mime,
+                              gfloat framerate,
+                              gint width,
+                              gint height)
+{
+  GrlRelatedKeys *relkeys = grl_related_keys_new ();
+  grl_related_keys_set_string (relkeys, GRL_METADATA_KEY_URL, url);
+  grl_related_keys_set_string (relkeys, GRL_METADATA_KEY_MIME, mime);
+  if (framerate >= 0) {
+    grl_related_keys_set_float (relkeys, GRL_METADATA_KEY_FRAMERATE, framerate);
+  }
+  if (width >= 0) {
+    grl_related_keys_set_int (relkeys, GRL_METADATA_KEY_WIDTH, width);
+  }
+  if (height >= 0) {
+    grl_related_keys_set_int (relkeys, GRL_METADATA_KEY_HEIGHT, height);
+  }
+  grl_data_add_related_keys (GRL_DATA (video), relkeys);
+}
+
+/**
+ * grl_media_video_get_url_data:
+ * @video: the media instance
+ * @mime: (out) (transfer none): the url mime-type, or %NULL to ignore
+ * @framerate: the url framerate, or %NULL to ignore
+ * @width: the url width, or %NULL to ignore
+ * @height: the url height, or %NULL to ignore
+ *
+ * Returns: all the keys related with the URL of a video resource in one go.
+ **/
+const gchar *
+grl_media_video_get_url_data (GrlMediaVideo *video,
+                              gchar **mime,
+                              gfloat *framerate,
+                              gint *width,
+                              gint *height)
 {
-  return grl_data_get_float (GRL_DATA (data), GRL_METADATA_KEY_FRAMERATE);
+  return grl_media_video_get_url_data_nth (video,
+                                           0,
+                                           mime,
+                                           framerate,
+                                           width,
+                                           height);
+}
+
+/**
+ * grl_media_video_get_url_data_nth:
+ * @video: the media instance
+ * @index: element to retrieve
+ * @mime: (out) (transfer none): the url mime-type, or %NULL to ignore
+ * @framerate: the url framerate, or %NULL to ignore
+ * @width: the url width, or %NULL to ignore
+ * @height: the url height, or %NULL to ignore
+ *
+ * Returns: all the keys related with the URL number @index of a video resource
+ * in one go.
+ **/
+const gchar *
+grl_media_video_get_url_data_nth (GrlMediaVideo *video,
+                                  guint index,
+                                  gchar **mime,
+                                  gfloat *framerate,
+                                  gint *width,
+                                  gint *height)
+{
+  GrlRelatedKeys *relkeys =
+    grl_data_get_related_keys (GRL_DATA (video), GRL_METADATA_KEY_URL, index);
+
+  if (!relkeys) {
+    return NULL;
+  }
+
+  if (mime) {
+    *mime = (gchar *) grl_related_keys_get_string (relkeys,
+                                                   GRL_METADATA_KEY_MIME);
+  }
+
+  if (framerate) {
+    *framerate = grl_related_keys_get_float (relkeys,
+                                             GRL_METADATA_KEY_FRAMERATE);
+  }
+
+  if (width) {
+    *width = grl_related_keys_get_int (relkeys, GRL_METADATA_KEY_WIDTH);
+  }
+
+  if (height) {
+    *height = grl_related_keys_get_int (relkeys, GRL_METADATA_KEY_HEIGHT);
+  }
+
+  return grl_related_keys_get_string (relkeys, GRL_METADATA_KEY_URL);
 }
diff --git a/src/data/grl-media-video.h b/src/data/grl-media-video.h
index 9f28db6..1f6e1fb 100644
--- a/src/data/grl-media-video.h
+++ b/src/data/grl-media-video.h
@@ -85,17 +85,17 @@ struct _GrlMediaVideo
   gpointer _grl_reserved[GRL_PADDING_SMALL];
 };
 
-void grl_media_video_set_width (GrlMediaVideo *data, gint width);
+void grl_media_video_set_width (GrlMediaVideo *video, gint width);
 
-void grl_media_video_set_height (GrlMediaVideo *data, gint height);
+void grl_media_video_set_height (GrlMediaVideo *video, gint height);
 
-void grl_media_video_set_framerate (GrlMediaVideo *data, gfloat framerate);
+void grl_media_video_set_framerate (GrlMediaVideo *video, gfloat framerate);
 
-gint grl_media_video_get_width (GrlMediaVideo *data);
+gint grl_media_video_get_width (GrlMediaVideo *video);
 
-gint grl_media_video_get_height (GrlMediaVideo *data);
+gint grl_media_video_get_height (GrlMediaVideo *video);
 
-gfloat grl_media_video_get_framerate (GrlMediaVideo *data);
+gfloat grl_media_video_get_framerate (GrlMediaVideo *video);
 
 GType grl_media_video_get_type (void) G_GNUC_CONST;
 
@@ -105,6 +105,33 @@ void grl_media_video_set_size (GrlMediaVideo *video,
                                gint width,
                                gint height);
 
+void grl_media_video_set_url_data (GrlMediaVideo *video,
+                                   const gchar *url,
+                                   const gchar *mime,
+                                   gfloat framerate,
+                                   gint width,
+                                   gint height);
+
+void grl_media_video_add_url_data (GrlMediaVideo *video,
+                                   const gchar *url,
+                                   const gchar *mime,
+                                   gfloat framerate,
+                                   gint width,
+                                   gint height);
+
+const gchar *grl_media_video_get_url_data (GrlMediaVideo *video,
+                                           gchar **mime,
+                                           gfloat *framerate,
+                                           gint *width,
+                                           gint *height);
+
+const gchar *grl_media_video_get_url_data_nth (GrlMediaVideo *video,
+                                               guint index,
+                                               gchar **mime,
+                                               gfloat *framerate,
+                                               gint *width,
+                                               gint *height);
+
 G_END_DECLS
 
 #endif /* _GRL_MEDIA_VIDEO_H_ */
diff --git a/src/data/grl-media.c b/src/data/grl-media.c
index d37bed3..3ee5830 100644
--- a/src/data/grl-media.c
+++ b/src/data/grl-media.c
@@ -25,7 +25,8 @@
 /**
  * SECTION:grl-media
  * @short_description: A multimedia data transfer object
- * @see_also: #GrlData, #GrlMediaBox, #GrlMediaVideo, #GrlMediaAudio, #GrlMediaImage
+ * @see_also: #GrlData, #GrlMediaBox, #GrlMediaVideo, #GrlMediaAudio,
+ * #GrlMediaImage
  *
  * This high level class represents a multimedia item. It has methods to
  * set and get properties like author, title, description, and so on.
@@ -70,8 +71,8 @@ static void
 grl_media_finalize (GObject *object)
 {
   GRL_DEBUG ("grl_media_finalize (%s)",
-                 grl_data_get_string (GRL_DATA (object),
-                                      GRL_METADATA_KEY_TITLE));
+             grl_data_get_string (GRL_DATA (object),
+                                  GRL_METADATA_KEY_TITLE));
   g_signal_handlers_destroy (object);
   G_OBJECT_CLASS (grl_media_parent_class)->finalize (object);
 }
@@ -112,6 +113,115 @@ grl_media_set_rating (GrlMedia *media, gfloat rating, gfloat max)
 }
 
 /**
+ * grl_media_set_url_data:
+ * @media: a #GrlMedia
+ * @url: the media's URL
+ * @mime: the @url mime type
+ *
+ * Set the media's URL and its mime-type.
+ **/
+void
+grl_media_set_url_data (GrlMedia *media, const gchar *url, const gchar *mime)
+{
+  GrlRelatedKeys *relkeys = grl_related_keys_new ();
+  grl_related_keys_set_string (relkeys, GRL_METADATA_KEY_URL, url);
+  grl_related_keys_set_string (relkeys, GRL_METADATA_KEY_MIME, mime);
+  grl_data_set_related_keys (GRL_DATA (media), relkeys, 0);
+}
+
+/**
+ * grl_media_add_url_data:
+ * @media: a #GrlMedia
+ * @url: a media's URL
+ * @mime: th @url mime type
+ *
+ * Adds a new media's URL with its mime-type.
+ **/
+void
+grl_media_add_url_data (GrlMedia *media, const gchar *url, const gchar *mime)
+{
+  GrlRelatedKeys *relkeys = grl_related_keys_new ();
+  grl_related_keys_set_string (relkeys, GRL_METADATA_KEY_URL, url);
+  grl_related_keys_set_string (relkeys, GRL_METADATA_KEY_MIME, mime);
+  grl_data_add_related_keys (GRL_DATA (media), relkeys);
+}
+
+/**
+ * grl_media_add_author:
+ * @media: a #GrlMedia
+ * @author: an author for @media
+ *
+ * Adds a new author to @media.
+ **/
+void
+grl_media_add_author (GrlMedia *media, const gchar *author)
+{
+  grl_data_add_string (GRL_DATA (media), GRL_METADATA_KEY_AUTHOR, author);
+}
+
+/**
+ * grl_media_add_thumbnail:
+ * @media: a #GrlMedia
+ * @thumbnail: a thumbnail for @media
+ *
+ * Adds a new thumbnail to @media.
+ **/
+void
+grl_media_add_thumbnail (GrlMedia *media, const gchar *thumbnail)
+{
+  grl_data_add_string (GRL_DATA (media), GRL_METADATA_KEY_THUMBNAIL, thumbnail);
+}
+
+/**
+ * grl_media_add_thumbnail_binary:
+ * @media: a #GrlMedia
+ * @thumbnail: a buffer containing the thumbnail for @media
+ * @size: size of buffer
+ *
+ * Adds a new thumbnail to @media.
+ **/
+void
+grl_media_add_thumbnail_binary (GrlMedia *media,
+                                const guint8 *thumbnail,
+                                gsize size)
+{
+  grl_data_add_binary (GRL_DATA (media),
+                       GRL_METADATA_KEY_THUMBNAIL_BINARY,
+                       thumbnail,
+                       size);
+}
+
+/**
+ * grl_media_add_external_player:
+ * @media: a #GrlMedia
+ * @player: an external player for @media
+ *
+ * Adds a new external player to @media.
+ **/
+void
+grl_media_add_external_player (GrlMedia *media, const gchar *player)
+{
+  grl_data_add_string (GRL_DATA (media),
+                       GRL_METADATA_KEY_EXTERNAL_PLAYER,
+                       player);
+}
+
+/**
+ * grl_media_add_external_url:
+ * @media: a #GrlMedia
+ * @url: an external url for @media
+ *
+ * Adds a new external url to @media.
+ **/
+void
+grl_media_add_external_url (GrlMedia *media, const gchar *url)
+{
+  grl_data_add_string (GRL_DATA (media),
+                       GRL_METADATA_KEY_EXTERNAL_URL,
+                       url);
+}
+
+/**
  * grl_media_serialize:
  * @media: a #GrlMedia
  *
@@ -375,7 +485,7 @@ grl_media_unserialize (const gchar *serial)
 
 /**
  * grl_media_set_id:
- * @data: the media
+ * @media: the media
  * @id: the identifier of the media
  *
  * Set the media identifier
@@ -383,16 +493,16 @@ grl_media_unserialize (const gchar *serial)
  * Since: 0.1.4
  */
 void
-grl_media_set_id (GrlMedia *data, const gchar *id)
+grl_media_set_id (GrlMedia *media, const gchar *id)
 {
-  grl_data_set_string (GRL_DATA (data),
+  grl_data_set_string (GRL_DATA (media),
                        GRL_METADATA_KEY_ID,
                        id);
 }
 
 /**
  * grl_media_set_url:
- * @data: the media
+ * @media: the media
  * @url: the media's URL
  *
  * Set the media's URL
@@ -400,16 +510,16 @@ grl_media_set_id (GrlMedia *data, const gchar *id)
  * Since: 0.1.4
  */
 void
-grl_media_set_url (GrlMedia *data, const gchar *url)
+grl_media_set_url (GrlMedia *media, const gchar *url)
 {
-  grl_data_set_string (GRL_DATA (data),
+  grl_data_set_string (GRL_DATA (media),
                        GRL_METADATA_KEY_URL,
                        url);
 }
 
 /**
  * grl_media_set_author:
- * @data: the media
+ * @media: the media
  * @author: the media's author
  *
  * Set the media's author
@@ -417,16 +527,16 @@ grl_media_set_url (GrlMedia *data, const gchar *url)
  * Since: 0.1.4
  */
 void
-grl_media_set_author (GrlMedia *data, const gchar *author)
+grl_media_set_author (GrlMedia *media, const gchar *author)
 {
-  grl_data_set_string (GRL_DATA (data),
+  grl_data_set_string (GRL_DATA (media),
                        GRL_METADATA_KEY_AUTHOR,
                        author);
 }
 
 /**
  * grl_media_set_title:
- * @data: the media
+ * @media: the media
  * @title: the title
  *
  * Set the media's title
@@ -434,16 +544,16 @@ grl_media_set_author (GrlMedia *data, const gchar *author)
  * Since: 0.1.4
  */
 void
-grl_media_set_title (GrlMedia *data, const gchar *title)
+grl_media_set_title (GrlMedia *media, const gchar *title)
 {
-  grl_data_set_string (GRL_DATA (data),
+  grl_data_set_string (GRL_DATA (media),
                        GRL_METADATA_KEY_TITLE,
                        title);
 }
 
 /**
  * grl_media_set_description:
- * @data: the media
+ * @media: the media
  * @description: the description
  *
  * Set the media's description
@@ -451,16 +561,16 @@ grl_media_set_title (GrlMedia *data, const gchar *title)
  * Since: 0.1.4
  */
 void
-grl_media_set_description (GrlMedia *data, const gchar *description)
+grl_media_set_description (GrlMedia *media, const gchar *description)
 {
-  grl_data_set_string (GRL_DATA (data),
+  grl_data_set_string (GRL_DATA (media),
                        GRL_METADATA_KEY_DESCRIPTION,
                        description);
 }
 
 /**
  * grl_media_set_source:
- * @data: the media
+ * @media: the media
  * @source: the source
  *
  * Set the media's source
@@ -468,16 +578,16 @@ grl_media_set_description (GrlMedia *data, const gchar *description)
  * Since: 0.1.4
  */
 void
-grl_media_set_source (GrlMedia *data, const gchar *source)
+grl_media_set_source (GrlMedia *media, const gchar *source)
 {
-  grl_data_set_string (GRL_DATA (data),
+  grl_data_set_string (GRL_DATA (media),
                        GRL_METADATA_KEY_SOURCE,
                        source);
 }
 
 /**
  * grl_media_set_thumbnail:
- * @data: the media
+ * @media: the media
  * @thumbnail: the thumbnail URL
  *
  * Set the media's thumbnail URL
@@ -485,16 +595,16 @@ grl_media_set_source (GrlMedia *data, const gchar *source)
  * Since: 0.1.4
  */
 void
-grl_media_set_thumbnail (GrlMedia *data, const gchar *thumbnail)
+grl_media_set_thumbnail (GrlMedia *media, const gchar *thumbnail)
 {
-  grl_data_set_string (GRL_DATA (data),
+  grl_data_set_string (GRL_DATA (media),
                        GRL_METADATA_KEY_THUMBNAIL,
                        thumbnail);
 }
 
 /**
  * grl_media_set_thumbnail_binary:
- * @data: the media
+ * @media: the media
  * @thumbnail: thumbnail buffer
  * @size: thumbnail buffer size
  *
@@ -503,9 +613,11 @@ grl_media_set_thumbnail (GrlMedia *data, const gchar *thumbnail)
  * Since: 0.1.9
  */
 void
-grl_media_set_thumbnail_binary (GrlMedia *data, const guint8 *thumbnail, gsize size)
+grl_media_set_thumbnail_binary (GrlMedia *media,
+                                const guint8 *thumbnail,
+                                gsize size)
 {
-  grl_data_set_binary (GRL_DATA (data),
+  grl_data_set_binary (GRL_DATA (media),
                        GRL_METADATA_KEY_THUMBNAIL_BINARY,
                        thumbnail,
                        size);
@@ -513,7 +625,7 @@ grl_media_set_thumbnail_binary (GrlMedia *data, const guint8 *thumbnail, gsize s
 
 /**
  * grl_media_set_site:
- * @data: the media
+ * @media: the media
  * @site: the site
  *
  * Set the media's site
@@ -521,16 +633,16 @@ grl_media_set_thumbnail_binary (GrlMedia *data, const guint8 *thumbnail, gsize s
  * Since: 0.1.4
  */
 void
-grl_media_set_site (GrlMedia *data, const gchar *site)
+grl_media_set_site (GrlMedia *media, const gchar *site)
 {
-  grl_data_set_string (GRL_DATA (data),
+  grl_data_set_string (GRL_DATA (media),
                        GRL_METADATA_KEY_SITE,
                        site);
 }
 
 /**
  * grl_media_set_duration:
- * @data: the media
+ * @media: the media
  * @duration: the duration
  *
  * Set the media's duration
@@ -538,31 +650,31 @@ grl_media_set_site (GrlMedia *data, const gchar *site)
  * Since: 0.1.4
  */
 void
-grl_media_set_duration (GrlMedia *data, gint duration)
+grl_media_set_duration (GrlMedia *media, gint duration)
 {
-  grl_data_set_int (GRL_DATA (data),
+  grl_data_set_int (GRL_DATA (media),
                     GRL_METADATA_KEY_DURATION,
                     duration);
 }
 
 /**
  * grl_media_set_date:
- * @data: the media
+ * @media: the media
  * @date: the date
  *
  * Set the media's date (TBD)
  */
 void
-grl_media_set_date (GrlMedia *data, const gchar *date)
+grl_media_set_date (GrlMedia *media, const gchar *date)
 {
-  grl_data_set_string (GRL_DATA (data),
+  grl_data_set_string (GRL_DATA (media),
                        GRL_METADATA_KEY_DATE,
                        date);
 }
 
 /**
  * grl_media_set_mime:
- * @data: the media
+ * @media: the media
  * @mime: the mime type
  *
  * Set the media's mime-type
@@ -570,16 +682,16 @@ grl_media_set_date (GrlMedia *data, const gchar *date)
  * Since: 0.1.4
  */
 void
-grl_media_set_mime (GrlMedia *data, const gchar *mime)
+grl_media_set_mime (GrlMedia *media, const gchar *mime)
 {
-  grl_data_set_string (GRL_DATA (data),
+  grl_data_set_string (GRL_DATA (media),
                        GRL_METADATA_KEY_MIME,
                        mime);
 }
 
 /**
  * grl_media_set_play_count:
- * @data: the media
+ * @media: the media
  * @play_count: the play count
  *
  * Set the media play count
@@ -587,16 +699,16 @@ grl_media_set_mime (GrlMedia *data, const gchar *mime)
  * Since: 0.1.4
  */
 void
-grl_media_set_play_count (GrlMedia *data, gint play_count)
+grl_media_set_play_count (GrlMedia *media, gint play_count)
 {
-  grl_data_set_int (GRL_DATA (data),
+  grl_data_set_int (GRL_DATA (media),
                     GRL_METADATA_KEY_PLAY_COUNT,
                     play_count);
 }
 
 /**
  * grl_media_set_last_played:
- * @data: the media
+ * @media: the media
  * @last_played: date when the media was last played
  *
  * Set the media last played date
@@ -604,16 +716,16 @@ grl_media_set_play_count (GrlMedia *data, gint play_count)
  * Since: 0.1.4
  */
 void
-grl_media_set_last_played (GrlMedia *data, const gchar *last_played)
+grl_media_set_last_played (GrlMedia *media, const gchar *last_played)
 {
-  grl_data_set_string (GRL_DATA (data),
+  grl_data_set_string (GRL_DATA (media),
                        GRL_METADATA_KEY_LAST_PLAYED,
                        last_played);
 }
 
 /**
  * grl_media_set_last_position:
- * @data: the media
+ * @media: the media
  * @last_position: second at which the media playback was interrupted
  *
  * Set the media last played position
@@ -621,16 +733,16 @@ grl_media_set_last_played (GrlMedia *data, const gchar *last_played)
  * Since: 0.1.4
  */
 void
-grl_media_set_last_position (GrlMedia *data, gint last_position)
+grl_media_set_last_position (GrlMedia *media, gint last_position)
 {
-  grl_data_set_int (GRL_DATA (data),
+  grl_data_set_int (GRL_DATA (media),
                     GRL_METADATA_KEY_LAST_POSITION,
                     last_position);
 }
 
 /**
  * grl_media_set_external_player:
- * @data: the media
+ * @media: the media
  * @player: location of an external player for this media
  *
  * Set the location of a player for the media (usually a flash player)
@@ -638,16 +750,16 @@ grl_media_set_last_position (GrlMedia *data, gint last_position)
  * Since: 0.1.6
  */
 void
-grl_media_set_external_player (GrlMedia *data, const gchar *player)
+grl_media_set_external_player (GrlMedia *media, const gchar *player)
 {
-  grl_data_set_string (GRL_DATA (data),
+  grl_data_set_string (GRL_DATA (media),
                        GRL_METADATA_KEY_EXTERNAL_PLAYER,
                        player);
 }
 
 /**
  * grl_media_set_external_url:
- * @data: the media
+ * @media: the media
  * @url: external location where this media can be played.
  *
  * Set an external location where users can play the media
@@ -655,16 +767,16 @@ grl_media_set_external_player (GrlMedia *data, const gchar *player)
  * Since: 0.1.6
  */
 void
-grl_media_set_external_url (GrlMedia *data, const gchar *url)
+grl_media_set_external_url (GrlMedia *media, const gchar *url)
 {
-  grl_data_set_string (GRL_DATA (data),
+  grl_data_set_string (GRL_DATA (media),
                        GRL_METADATA_KEY_EXTERNAL_URL,
                        url);
 }
 
 /**
  * grl_media_set_studio:
- * @data: the media
+ * @media: the media
  * @studio: The studio the media is from
  *
  * Set the media studio
@@ -672,16 +784,16 @@ grl_media_set_external_url (GrlMedia *data, const gchar *url)
  * Since: 0.1.6
  */
 void
-grl_media_set_studio (GrlMedia *data, const gchar *studio)
+grl_media_set_studio (GrlMedia *media, const gchar *studio)
 {
-  grl_data_set_string (GRL_DATA (data),
+  grl_data_set_string (GRL_DATA (media),
                        GRL_METADATA_KEY_STUDIO,
                        studio);
 }
 
 /**
  * grl_media_set_certificate:
- * @data: the media
+ * @media: the media
  * @certificate: The rating certificate of the media
  *
  * Set the media certificate
@@ -689,16 +801,16 @@ grl_media_set_studio (GrlMedia *data, const gchar *studio)
  * Since: 0.1.6
  */
 void
-grl_media_set_certificate (GrlMedia *data, const gchar *certificate)
+grl_media_set_certificate (GrlMedia *media, const gchar *certificate)
 {
-  grl_data_set_string (GRL_DATA (data),
+  grl_data_set_string (GRL_DATA (media),
                        GRL_METADATA_KEY_CERTIFICATE,
                        certificate);
 }
 
 /**
  * grl_media_set_license:
- * @data: the media
+ * @media: the media
  * @license: The license of the media
  *
  * Set the media license
@@ -706,114 +818,197 @@ grl_media_set_certificate (GrlMedia *data, const gchar *certificate)
  * Since: 0.1.6
  */
 void
-grl_media_set_license (GrlMedia *data, const gchar *license)
+grl_media_set_license (GrlMedia *media, const gchar *license)
 {
-  grl_data_set_string (GRL_DATA (data),
+  grl_data_set_string (GRL_DATA (media),
                        GRL_METADATA_KEY_LICENSE,
                        license);
 }
 
 /**
  * grl_media_get_id:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: the media's identifier
  *
  * Since: 0.1.4
  */
 const gchar *
-grl_media_get_id (GrlMedia *data)
+grl_media_get_id (GrlMedia *media)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_ID);
+  return grl_data_get_string (GRL_DATA (media), GRL_METADATA_KEY_ID);
 }
 
 /**
  * grl_media_get_url:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: the media's URL
  *
  * Since: 0.1.4
  */
 const gchar *
-grl_media_get_url (GrlMedia *data)
+grl_media_get_url (GrlMedia *media)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_URL);
+  return grl_data_get_string (GRL_DATA (media), GRL_METADATA_KEY_URL);
+}
+
+/**
+ * grl_media_get_url_data:
+ * @media: the media object
+ * @mime: (out) (transfer none): the mime-type, or %NULL to ignore.
+ *
+ * Returns: the media's URL and its mime-type.
+ */
+const gchar *
+grl_media_get_url_data (GrlMedia *media, gchar **mime)
+{
+  return grl_media_get_url_data_nth (media, 0, mime);
+}
+
+/**
+ * grl_media_get_url_data_nth:
+ * @media: the media object
+ * @index: element to retrieve
+ * @mime: (out) (transfer none): the mime-type, or %NULL to ignore.
+ *
+ * Returns: the n-th media's URL and its mime-type.
+ */
+const gchar *
+grl_media_get_url_data_nth (GrlMedia *media, guint index, gchar **mime)
+{
+  GrlRelatedKeys *relkeys =
+    grl_data_get_related_keys (GRL_DATA (media), GRL_METADATA_KEY_URL, index);
+
+  if (!relkeys) {
+    return NULL;
+  }
+
+  if (mime) {
+    *mime = (gchar *) grl_related_keys_get_string (relkeys,
+                                                   GRL_METADATA_KEY_MIME);
+  }
+
+  return grl_related_keys_get_string (relkeys, GRL_METADATA_KEY_URL);
 }
 
 /**
  * grl_media_get_author:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: the media's author
  *
  * Since: 0.1.4
  */
 const gchar *
-grl_media_get_author (GrlMedia *data)
+grl_media_get_author (GrlMedia *media)
+{
+  return grl_data_get_string (GRL_DATA (media), GRL_METADATA_KEY_AUTHOR);
+}
+
+/**
+ * grl_media_get_author_nth:
+ * @media: the media object
+ * @index: element to retrieve
+ *
+ * Returns: the n-th media's author.
+ */
+const gchar *
+grl_media_get_author_nth (GrlMedia *media, guint index)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_AUTHOR);
+  GrlRelatedKeys *relkeys =
+    grl_data_get_related_keys (GRL_DATA (media),
+                               GRL_METADATA_KEY_AUTHOR,
+                               index);
+
+  if (!relkeys) {
+    return NULL;
+  } else {
+    return grl_related_keys_get_string (relkeys, GRL_METADATA_KEY_AUTHOR);
+  }
 }
 
 /**
  * grl_media_get_title:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: the media's title
  *
  * Since: 0.1.4
  */
 const gchar *
-grl_media_get_title (GrlMedia *data)
+grl_media_get_title (GrlMedia *media)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_TITLE);
+  return grl_data_get_string (GRL_DATA (media), GRL_METADATA_KEY_TITLE);
 }
 
 /**
  * grl_media_get_description:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: the media's description
  *
  * Since: 0.1.4
  */
 const gchar *
-grl_media_get_description (GrlMedia *data)
+grl_media_get_description (GrlMedia *media)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_DESCRIPTION);
+  return grl_data_get_string (GRL_DATA (media), GRL_METADATA_KEY_DESCRIPTION);
 }
 
 /**
  * grl_media_get_source:
- * @data: the media object source
+ * @media: the media object source
  *
  * Returns: the media's source
  *
  * Since: 0.1.4
  */
 const gchar *
-grl_media_get_source (GrlMedia *data)
+grl_media_get_source (GrlMedia *media)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_SOURCE);
+  return grl_data_get_string (GRL_DATA (media), GRL_METADATA_KEY_SOURCE);
 }
 
 /**
  * grl_media_get_thumbnail:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: the media's thumbnail URL
  *
  * Since: 0.1.4
  */
 const gchar *
-grl_media_get_thumbnail (GrlMedia *data)
+grl_media_get_thumbnail (GrlMedia *media)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_THUMBNAIL);
+  return grl_data_get_string (GRL_DATA (media), GRL_METADATA_KEY_THUMBNAIL);
+}
+
+/**
+ * grl_media_get_thumbnail_nth:
+ * @media: the media object
+ * @index: element to retrieve
+ *
+ * Returns: the n-th media's thumbnail.
+ */
+const gchar *
+grl_media_get_thumbnail_nth (GrlMedia *media, guint index)
+{
+  GrlRelatedKeys *relkeys =
+    grl_data_get_related_keys (GRL_DATA (media),
+                               GRL_METADATA_KEY_THUMBNAIL,
+                               index);
+
+  if (!relkeys) {
+    return NULL;
+  } else {
+    return grl_related_keys_get_string (relkeys, GRL_METADATA_KEY_THUMBNAIL);
+  }
 }
 
 /**
  * grl_media_get_thumbnail_binary:
- * @data: the media object
+ * @media: the media object
  * @size: pointer to storing the thumbnail buffer size
  *
  * Returns: the media's thumbnail data and set size to the thumbnail buffer size
@@ -821,128 +1016,154 @@ grl_media_get_thumbnail (GrlMedia *data)
  * Since: 0.1.9
  */
 const guint8 *
-grl_media_get_thumbnail_binary (GrlMedia *data, gsize *size)
+grl_media_get_thumbnail_binary (GrlMedia *media, gsize *size)
 {
-  return grl_data_get_binary (GRL_DATA (data),
+  return grl_data_get_binary (GRL_DATA (media),
                               GRL_METADATA_KEY_THUMBNAIL_BINARY,
                               size);
 }
 
 /**
+ * grl_media_get_thumbnail_binary_nth:
+ * @media: the media object
+ * @size: pointer to store the thumbnail buffer size
+ * @index: element to retrieve
+ *
+ * Returns: the n-th media's thumbnail binary and sets size to the thumbnail
+ * buffer size.
+ */
+const guint8 *
+grl_media_get_thumbnail_binary_nth (GrlMedia *media, gsize *size, guint index)
+{
+  GrlRelatedKeys *relkeys =
+    grl_data_get_related_keys (GRL_DATA (media),
+                               GRL_METADATA_KEY_THUMBNAIL,
+                               index);
+
+  if (!relkeys) {
+    return NULL;
+  } else {
+    return grl_related_keys_get_binary (relkeys,
+                                        GRL_METADATA_KEY_THUMBNAIL,
+                                        size);
+  }
+}
+
+/**
  * grl_media_get_site:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: the media's site
  *
  * Since: 0.1.4
  */
 const gchar *
-grl_media_get_site (GrlMedia *data)
+grl_media_get_site (GrlMedia *media)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_SITE);
+  return grl_data_get_string (GRL_DATA (media), GRL_METADATA_KEY_SITE);
 }
 
 /**
  * grl_media_get_duration:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: the media's duration
  *
  * Since: 0.1.4
  */
 gint
-grl_media_get_duration (GrlMedia *data)
+grl_media_get_duration (GrlMedia *media)
 {
-  return grl_data_get_int (GRL_DATA (data), GRL_METADATA_KEY_DURATION);
+  return grl_data_get_int (GRL_DATA (media), GRL_METADATA_KEY_DURATION);
 }
 
 /**
  * grl_media_get_date:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: the media's date (TBD)
  *
  * Since: 0.1.4
  */
 const gchar *
-grl_media_get_date (GrlMedia *data)
+grl_media_get_date (GrlMedia *media)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_DATE);
+  return grl_data_get_string (GRL_DATA (media), GRL_METADATA_KEY_DATE);
 }
 
 /**
  * grl_media_get_mime:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: the media's mime-type
  *
  * Since: 0.1.4
  */
 const gchar *
-grl_media_get_mime (GrlMedia *data)
+grl_media_get_mime (GrlMedia *media)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_MIME);
+  return grl_data_get_string (GRL_DATA (media), GRL_METADATA_KEY_MIME);
 }
 
 /**
  * grl_media_get_rating:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: the media's rating
  *
  * Since: 0.1.5
  */
 gfloat
-grl_media_get_rating (GrlMedia *data)
+grl_media_get_rating (GrlMedia *media)
 {
-  return grl_data_get_float (GRL_DATA (data), GRL_METADATA_KEY_RATING);
+  return grl_data_get_float (GRL_DATA (media), GRL_METADATA_KEY_RATING);
 }
 
 /**
  * grl_media_get_play_count:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: the media's play count
  *
  * Since: 0.1.4
  */
 gint
-grl_media_get_play_count (GrlMedia *data)
+grl_media_get_play_count (GrlMedia *media)
 {
-  return grl_data_get_int (GRL_DATA (data), GRL_METADATA_KEY_PLAY_COUNT);
+  return grl_data_get_int (GRL_DATA (media), GRL_METADATA_KEY_PLAY_COUNT);
 }
 
 /**
  * grl_media_get_last_position:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: the media's last_played position (in seconds)
  *
  * Since: 0.1.4
  */
 gint
-grl_media_get_last_position (GrlMedia *data)
+grl_media_get_last_position (GrlMedia *media)
 {
-  return grl_data_get_int (GRL_DATA (data), GRL_METADATA_KEY_LAST_POSITION);
+  return grl_data_get_int (GRL_DATA (media), GRL_METADATA_KEY_LAST_POSITION);
 }
 
 /**
  * grl_media_get_last_played:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: the media's last played time
  *
  * Since: 0.1.4
  */
 const gchar *
-grl_media_get_last_played (GrlMedia *data)
+grl_media_get_last_played (GrlMedia *media)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_LAST_PLAYED);
+  return grl_data_get_string (GRL_DATA (media), GRL_METADATA_KEY_LAST_PLAYED);
 }
 
 /**
  * grl_media_get_player:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: URL of an external player
  * object for this media
@@ -950,15 +1171,15 @@ grl_media_get_last_played (GrlMedia *data)
  * Since: 0.1.6
  */
 const gchar *
-grl_media_get_player(GrlMedia *data)
+grl_media_get_player(GrlMedia *media)
 {
-  return grl_data_get_string (GRL_DATA (data),
+  return grl_data_get_string (GRL_DATA (media),
                               GRL_METADATA_KEY_EXTERNAL_PLAYER);
 }
 
 /**
  * grl_media_get_external_url:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: URL of an external location
  * where the user play the media.
@@ -966,49 +1187,49 @@ grl_media_get_player(GrlMedia *data)
  * Since: 0.1.6
  */
 const gchar *
-grl_media_get_external_url (GrlMedia *data)
+grl_media_get_external_url (GrlMedia *media)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_EXTERNAL_URL);
+  return grl_data_get_string (GRL_DATA (media), GRL_METADATA_KEY_EXTERNAL_URL);
 }
 
 /**
  * grl_media_get_studio:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: the studio the media is from
  *
  * Since: 0.1.6
  */
 const gchar *
-grl_media_get_studio(GrlMedia *data)
+grl_media_get_studio(GrlMedia *media)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_STUDIO);
+  return grl_data_get_string (GRL_DATA (media), GRL_METADATA_KEY_STUDIO);
 }
 
 /**
  * grl_media_get_certificate:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: the media's certificate
  *
  * Since: 0.1.6
  */
 const gchar *
-grl_media_get_certificate (GrlMedia *data)
+grl_media_get_certificate (GrlMedia *media)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_CERTIFICATE);
+  return grl_data_get_string (GRL_DATA (media), GRL_METADATA_KEY_CERTIFICATE);
 }
 
 /**
  * grl_media_get_license:
- * @data: the media object
+ * @media: the media object
  *
  * Returns: the license the media is under
  *
  * Since: 0.1.6
  */
 const gchar *
-grl_media_get_license (GrlMedia *data)
+grl_media_get_license (GrlMedia *media)
 {
-  return grl_data_get_string (GRL_DATA (data), GRL_METADATA_KEY_LICENSE);
+  return grl_data_get_string (GRL_DATA (media), GRL_METADATA_KEY_LICENSE);
 }
diff --git a/src/data/grl-media.h b/src/data/grl-media.h
index 31c2928..9ef9b4e 100644
--- a/src/data/grl-media.h
+++ b/src/data/grl-media.h
@@ -99,89 +99,117 @@ struct _GrlMedia
   gpointer _grl_reserved[GRL_PADDING_SMALL];
 };
 
-void grl_media_set_id (GrlMedia *data, const gchar *id);
+void grl_media_set_id (GrlMedia *media, const gchar *id);
 
-void grl_media_set_url (GrlMedia *data, const gchar *url);
+void grl_media_set_url (GrlMedia *media, const gchar *url);
 
-void grl_media_set_author (GrlMedia *data, const gchar *author);
+void grl_media_set_author (GrlMedia *media, const gchar *author);
 
-void grl_media_set_title (GrlMedia *data, const gchar *title);
+void grl_media_set_title (GrlMedia *media, const gchar *title);
 
-void grl_media_set_description (GrlMedia *data, const gchar *description);
+void grl_media_set_description (GrlMedia *media, const gchar *description);
 
-void grl_media_set_source (GrlMedia *data, const gchar *source);
+void grl_media_set_source (GrlMedia *media, const gchar *source);
 
-void grl_media_set_thumbnail (GrlMedia *data, const gchar *thumbnail);
+void grl_media_set_thumbnail (GrlMedia *media, const gchar *thumbnail);
 
-void grl_media_set_thumbnail_binary (GrlMedia *data, const guint8 *thumbnail, gsize size);
+void grl_media_set_thumbnail_binary (GrlMedia *media, const guint8 *thumbnail, gsize size);
 
-void grl_media_set_site (GrlMedia *data, const gchar *site);
+void grl_media_set_site (GrlMedia *media, const gchar *site);
 
-void grl_media_set_duration (GrlMedia *data, gint duration);
+void grl_media_set_duration (GrlMedia *media, gint duration);
 
-void grl_media_set_date (GrlMedia *data, const gchar *date);
+void grl_media_set_date (GrlMedia *media, const gchar *date);
 
-void grl_media_set_mime (GrlMedia *data, const gchar *mime);
+void grl_media_set_mime (GrlMedia *media, const gchar *mime);
 
-void grl_media_set_play_count (GrlMedia *data, gint play_count);
+void grl_media_set_play_count (GrlMedia *media, gint play_count);
 
-void grl_media_set_last_played (GrlMedia *data, const gchar *last_played);
+void grl_media_set_last_played (GrlMedia *media, const gchar *last_played);
 
-void grl_media_set_last_position (GrlMedia *data, gint last_position);
+void grl_media_set_last_position (GrlMedia *media, gint last_position);
 
-void grl_media_set_external_player (GrlMedia *data, const gchar *player);
+void grl_media_set_external_player (GrlMedia *media, const gchar *player);
 
-void grl_media_set_external_url (GrlMedia *data, const gchar *url);
+void grl_media_set_external_url (GrlMedia *media, const gchar *url);
 
-void grl_media_set_studio (GrlMedia *data, const gchar *studio);
+void grl_media_set_studio (GrlMedia *media, const gchar *studio);
 
-void grl_media_set_certificate (GrlMedia *data, const gchar *certificate);
+void grl_media_set_certificate (GrlMedia *media, const gchar *certificate);
 
 void grl_media_set_license (GrlMedia *data, const gchar *license);
 
 void grl_media_set_rating (GrlMedia *media, gfloat rating, gfloat max);
 
-const gchar *grl_media_get_id (GrlMedia *data);
+void grl_media_set_url_data (GrlMedia *media, const gchar *url, const gchar *mime);
 
-const gchar *grl_media_get_url (GrlMedia *data);
+void grl_media_add_url_data (GrlMedia *media, const gchar *url, const gchar *mime);
 
-const gchar *grl_media_get_author (GrlMedia *data);
+void grl_media_add_author (GrlMedia *media, const gchar *author);
 
-const gchar *grl_media_get_title (GrlMedia *data);
+void grl_media_add_thumbnail (GrlMedia *media, const gchar *thumbnail);
 
-const gchar *grl_media_get_description (GrlMedia *data);
+void grl_media_add_thumbnail_binary (GrlMedia *media, const guint8 *thumbnail, gsize size);
 
-const gchar *grl_media_get_source (GrlMedia *data);
+void grl_media_add_external_player (GrlMedia *media, const gchar *player);
 
-const gchar *grl_media_get_thumbnail (GrlMedia *data);
+void grl_media_add_external_url (GrlMedia *media, const gchar *url);
 
-const guint8 *grl_media_get_thumbnail_binary (GrlMedia *data, gsize *size);
+const gchar *grl_media_get_id (GrlMedia *media);
 
-const gchar *grl_media_get_site (GrlMedia *data);
+const gchar *grl_media_get_url (GrlMedia *media);
 
-gint grl_media_get_duration (GrlMedia *data);
+const gchar *grl_media_get_url_data (GrlMedia *media, gchar **mime);
 
-const gchar *grl_media_get_date (GrlMedia *data);
+const gchar *grl_media_get_url_data_nth (GrlMedia *media, guint index, gchar **mime);
 
-const gchar *grl_media_get_mime (GrlMedia *data);
+const gchar *grl_media_get_author (GrlMedia *media);
 
-gfloat grl_media_get_rating (GrlMedia *data);
+const gchar *grl_media_get_author_nth (GrlMedia *media, guint index);
 
-gint grl_media_get_play_count (GrlMedia *data);
+const gchar *grl_media_get_title (GrlMedia *media);
 
-gint grl_media_get_last_position (GrlMedia *data);
+const gchar *grl_media_get_description (GrlMedia *media);
 
-const gchar *grl_media_get_last_played (GrlMedia *data);
+const gchar *grl_media_get_source (GrlMedia *media);
 
-const gchar *grl_media_get_player (GrlMedia *data);
+const gchar *grl_media_get_thumbnail (GrlMedia *media);
 
-const gchar *grl_media_get_external_url (GrlMedia *data);
+const gchar *grl_media_get_thumbnail_nth (GrlMedia *media, guint index);
 
-const gchar *grl_media_get_studio (GrlMedia *data);
+const guint8 *grl_media_get_thumbnail_binary (GrlMedia *media, gsize *size);
 
-const gchar *grl_media_get_certificate (GrlMedia *data);
+const guint8 *grl_media_get_thumbnail_binary_nth (GrlMedia *media, gsize *size, guint index);
 
-const gchar *grl_media_get_license (GrlMedia *data);
+const gchar *grl_media_get_site (GrlMedia *media);
+
+gint grl_media_get_duration (GrlMedia *media);
+
+const gchar *grl_media_get_date (GrlMedia *media);
+
+const gchar *grl_media_get_mime (GrlMedia *media);
+
+gfloat grl_media_get_rating (GrlMedia *media);
+
+gint grl_media_get_play_count (GrlMedia *media);
+
+gint grl_media_get_last_position (GrlMedia *media);
+
+const gchar *grl_media_get_last_played (GrlMedia *media);
+
+const gchar *grl_media_get_player (GrlMedia *media);
+
+const gchar *grl_media_get_player_nth (GrlMedia *media, guint index);
+
+const gchar *grl_media_get_external_url (GrlMedia *media);
+
+const gchar *grl_media_get_external_url_nth (GrlMedia *media, guint index);
+
+const gchar *grl_media_get_studio (GrlMedia *media);
+
+const gchar *grl_media_get_certificate (GrlMedia *media);
+
+const gchar *grl_media_get_license (GrlMedia *media);
 
 GType grl_media_get_type (void) G_GNUC_CONST;
 
-- 
1.7.1



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