Bug 15232 - Command separated tagged values should be encoded
: Command separated tagged values should be encoded
Status: NEW
Product: Logitech Media Server
Classification: Unclassified
Component: CLI
: 7.4.1
: All All
: -- normal with 2 votes (vote)
: Future
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-02 01:24 UTC by Cyborg
Modified: 2011-11-06 23:22 UTC (History)
1 user (show)

See Also:
Category: Feature


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cyborg 2009-12-02 01:24:36 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.
Comment 1 AndrewFG 2010-08-20 06:28:09 UTC
Actually I think the correct definition of comma- delimited encoding should give you the following string:
 
artist:"Eeny, Meeny, Miny, Moe", Madonna
Comment 2 Peter Watkins 2010-08-20 11:16:45 UTC
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.
Comment 3 Alan Young 2011-11-06 23:22:06 UTC
Unassigned bugs cannot have a priority.