INTERACT FORUM
More => Old Versions => JRiver Media Center 27 for Windows => Topic started by: zybex on September 15, 2020, 04:20:29 am
-
When calling SetInfo to set a field value with the same value as the field already has, the API returns "failure".
i.e., calling Setinfo to set "Media Type = Audio" when it's already set to Audio, returns an error.
This is misleading in my view as the call didn't fail - the field was set to the desired value, so there's no error to handle. It should return success.
The same happens on the corresponding COM API call, file.Set(field, value). Please fix.
-
Next build:
Changed: When no changes are made with a MCWS/v1/File/SetInfo call, the response "No changes." is provided with the failure.
-
Thanks Matt.
But why return Failure at all, there is no error. "ok, no change" makes more sense to me.
The COM API only returns true/false... any change there?
-
True is only returned when the value is changed.
-
This was a recent change, it was not so on v26.0.103 - it returned OK on this scenario. Making breaking protocol changes on the last few versions of a branch is not good practice, and returning an error on an operation that had in fact the desired outcome is nonsensical.