From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> Some players such as Spotify implements some properties that are defined in MPRIS as int64 as uint64 which makes it fail to register. --- profiles/audio/media.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/profiles/audio/media.c b/profiles/audio/media.c index 33847e5..ce674d0 100644 --- a/profiles/audio/media.c +++ b/profiles/audio/media.c @@ -1322,8 +1322,12 @@ static gboolean parse_int64_metadata(struct media_player *mp, const char *key, { uint64_t value; char valstr[20]; + int type; - if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_INT64) + type = dbus_message_iter_get_arg_type(iter); + if (type == DBUS_TYPE_UINT64) + warn("expected DBUS_TYPE_INT64 got DBUS_TYPE_UINT64"); + else if (type != DBUS_TYPE_INT64) return FALSE; dbus_message_iter_get_basic(iter, &value); @@ -1345,8 +1349,12 @@ static gboolean parse_int32_metadata(struct media_player *mp, const char *key, { uint32_t value; char valstr[20]; + int type; - if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_INT32) + type = dbus_message_iter_get_arg_type(iter); + if (type == DBUS_TYPE_UINT32) + warn("expected DBUS_TYPE_INT32 got DBUS_TYPE_UINT32"); + else if (type != DBUS_TYPE_INT32) return FALSE; dbus_message_iter_get_basic(iter, &value); -- 1.8.1.4 -- 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