[grilo] pls: Export the "audio-track" playlist attribute



commit 50ff107e98481cf44b540323d851ce2115146b21
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Feb 8 16:11:41 2015 +0100

    pls: Export the "audio-track" playlist attribute
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744168

 libs/pls/grl-pls.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libs/pls/grl-pls.c b/libs/pls/grl-pls.c
index 7b21ff4..0695457 100644
--- a/libs/pls/grl-pls.c
+++ b/libs/pls/grl-pls.c
@@ -515,6 +515,7 @@ grl_media_new_from_pls_entry (const gchar *uri,
   const gchar *title, *thumbnail;
   const gchar *description, *mimetype;
   const gchar *duration_ms;
+  const gchar *audio_track;
 
   GRL_DEBUG ("%s (\"%s\")", __FUNCTION__, uri);
 
@@ -549,6 +550,9 @@ grl_media_new_from_pls_entry (const gchar *uri,
   mimetype = g_hash_table_lookup (metadata, TOTEM_PL_PARSER_FIELD_CONTENT_TYPE);
   if (mimetype)
     grl_media_set_mime (media, mimetype);
+  audio_track = g_hash_table_lookup (metadata, TOTEM_PL_PARSER_FIELD_AUDIO_TRACK);
+  if (audio_track)
+    grl_data_set_int (GRL_DATA (media), GRL_METADATA_KEY_AUDIO_TRACK, atoi (audio_track));
 
   if (GRL_IS_MEDIA_AUDIO(media)) {
     GrlMediaAudio *audio = GRL_MEDIA_AUDIO(media);


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