INTERACT FORUM

More => Old Versions => JRiver Media Center 27 for Windows => Topic started by: DrKNo on August 06, 2020, 11:44:18 am

Title: MCWS: Files/SetInfo with multiple values and commas
Post by: DrKNo on August 06, 2020, 11:44:18 am
Im using Files/SetInfo to set all changed values of a File at once. If for example a genre contains a comma, the server returns a http 500 code, probably because it parses the comma as a value separator according to CSV. I tried escaping the comma with a backslash, but to no avail. How can I set multiple fields in one call, if one or more fields contain a comma?

Title: Re: MCWS: Files/SetInfo with multiple values and commas
Post by: Matt on August 06, 2020, 11:50:52 am
This worked for me:
http://localhost:52199/MCWS/v1/File/SetInfo?File=10347148&FileType=Key&Formatted=1&Field=Name&Value=a%2cb
Title: Re: MCWS: Files/SetInfo with multiple values and commas
Post by: DrKNo on August 06, 2020, 11:55:02 am
Yes, single value calls work, probably because they are not treated as CSV. I am having problems with calls with multiple values and the List=CSV parameter set.
Title: Re: MCWS: Files/SetInfo with multiple values and commas
Post by: Matt on August 06, 2020, 12:03:05 pm
This seems to work for CSV for me:
http://localhost:52199/MCWS/v1/File/SetInfo?File=10347148&FileType=Key&List=csv&Formatted=1&Field=Name,Artist&Value=%22a%22,%22a,b%22
Title: Re: MCWS: Files/SetInfo with multiple values and commas
Post by: DrKNo on August 06, 2020, 12:08:22 pm
Works on all cases I tested so far. Thank you for the fast reply, Matt!