From da0b4881fbf61c2a5d54e4857e15cd7cd144fa16 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 3 Jan 2013 16:51:00 +0200 Subject: [PATCH] player: Fix documentation to use TrackNumber in track metadata Using Track key inside a Track property would be pointless, despite the documentation and code where also inconsistent. --- doc/media-api.txt | 2 +- profiles/audio/avrcp.c | 2 +- profiles/audio/player.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/media-api.txt b/doc/media-api.txt index ae4b0dd96..abf5ff905 100644 --- a/doc/media-api.txt +++ b/doc/media-api.txt @@ -272,7 +272,7 @@ Properties string Equalizer [readwrite] Number of tracks in total - uint32 Number: + uint32 TrackNumber: Track number diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c index 9ca5a3acf..3366b485f 100644 --- a/profiles/audio/avrcp.c +++ b/profiles/audio/avrcp.c @@ -649,7 +649,7 @@ static const char *metadata_to_str(uint32_t id) case AVRCP_MEDIA_ATTRIBUTE_GENRE: return "Genre"; case AVRCP_MEDIA_ATTRIBUTE_TRACK: - return "Track"; + return "TrackNumber"; case AVRCP_MEDIA_ATTRIBUTE_N_TRACKS: return "NumberOfTracks"; case AVRCP_MEDIA_ATTRIBUTE_DURATION: diff --git a/profiles/audio/player.c b/profiles/audio/player.c index 2e5c3865b..880745dd8 100644 --- a/profiles/audio/player.c +++ b/profiles/audio/player.c @@ -72,7 +72,7 @@ static void append_metadata(void *key, void *value, void *user_data) DBusMessageIter *dict = user_data; if (strcasecmp((char *) key, "Duration") == 0 || - strcasecmp((char *) key, "Track") == 0 || + strcasecmp((char *) key, "TrackNumber") == 0 || strcasecmp((char *) key, "NumberOfTracks") == 0) { uint32_t num = atoi(value); dict_append_entry(dict, key, DBUS_TYPE_UINT32, &num); -- 2.47.3