Bugzilla – Bug 15232
Command separated tagged values should be encoded
Last modified: 2011-11-06 23:22:06 UTC
When retrieving songinfo (or tracks) using the CLI and when the track contains multiple artists the artists and artist ids can be retrieved by specifying the tag: tags:A A <role> For every artist role (one of "artist", "composer", "conductor", "band", "albumartist" or "trackartist"), a comma separated list of names. The list of artists, e.g. "artist:Tom Jones, Robbie Williams" (here shown not encoded) is a comma separated list of artists. In the case where the artist name contans a comma (comma + space), e.g. "artist:Eeny, Meeny, Miny, Moe, Madonna" you cannot determine if there are 5 artists or 2 artists. My suggestion is to encode the entries in the list of comma separated artists just as the urls are double encoded. "artist:Eeny, Meeny, Miny, Moe, Madonna" should be encoded as "artist%3AEeny%252C%2520Meeny%252C%2520Miny%252C%2520Moe%2C%20Madonna". Decoding the response once would result in thf following string: "artist:Eeny%252C%2520Meeny%252C%2520Miny%252C%2520Moe, Madonna". Decoding each entry in the now truly comma separated list of artists is needed to get the names of each artist.
Actually I think the correct definition of comma- delimited encoding should give you the following string: artist:"Eeny, Meeny, Miny, Moe", Madonna
Any change in the output like this is certain to break existing apps that use the CLI. Therefore this extra encoding should be optional and not the default behavior. Either specific commands should look for a new tag indicating that the client wants the encoding, or there should be a new CLI command indicating that the client would (or would not) like extra encoding for all future responses.
Unassigned bugs cannot have a priority.