[PATCH 2/2] Make title always available in metadata

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

 



---
 audio/media.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/audio/media.c b/audio/media.c
index eecb44d..519cafe 100644
--- a/audio/media.c
+++ b/audio/media.c
@@ -1448,12 +1448,16 @@ static gboolean parse_player_metadata(struct media_player *mp,
 		dbus_message_iter_next(&dict);
 	}
 
-	if (title == FALSE)
-		goto parse_error;
-
 	if (g_hash_table_size(track) == 0) {
 		g_hash_table_unref(track);
 		track = NULL;
+	} else if (title == FALSE) {
+		struct metadata_value *value = g_new(struct metadata_value, 1);
+		uint32_t id = AVRCP_MEDIA_ATTRIBUTE_TITLE;
+
+		value->type = DBUS_TYPE_STRING;
+		value->value.str = g_strdup("");
+		g_hash_table_insert(track, GUINT_TO_POINTER(id), value);
 	}
 
 	if (mp->track != NULL)
-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux