[grilo] pls: Support older versions of totem-pl-parser
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] pls: Support older versions of totem-pl-parser
- Date: Tue, 17 Feb 2015 12:41:08 +0000 (UTC)
commit 00f1f93eeabf89fd94014061060b77d700cfe84f
Author: Bastien Nocera <hadess hadess net>
Date: Tue Feb 17 13:39:12 2015 +0100
pls: Support older versions of totem-pl-parser
But no need to recompile grilo to support newer versions.
libs/pls/grl-pls.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libs/pls/grl-pls.c b/libs/pls/grl-pls.c
index 0695457..f03c4ac 100644
--- a/libs/pls/grl-pls.c
+++ b/libs/pls/grl-pls.c
@@ -550,6 +550,11 @@ 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);
+
+/* For older totem-pl-parser versions */
+#ifndef TOTEM_PL_PARSER_FIELD_AUDIO_TRACK
+#define TOTEM_PL_PARSER_FIELD_AUDIO_TRACK "audio-track"
+#endif
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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]