-
-
Notifications
You must be signed in to change notification settings - Fork 109
Fix GetGroupSceneItemList #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1742,7 +1742,7 @@ public List<JObject> GetGroupSceneItemList(string sceneName) | |
| }; | ||
|
|
||
| var response = SendRequest(nameof(GetGroupSceneItemList), request); | ||
| return JsonConvert.DeserializeObject<List<JObject>>((string)response["sceneItems"]); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All other functions are in the format of
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The deserialization does not like the direct cast here, causing the request to hang. Now that you have me thinking, maybe changing List to something like a JArray could work as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When I was testing with my code, it was failing on line 1747 saying it couldn't convert from Array to String but I changed it to this and got it to work:
You'll notice I also changed the overall function to return as SceneItemDetails like it was before but apparently for whatever reason the (string) isn't allowed whereas .ToString() is fine. |
||
| return JsonConvert.DeserializeObject<List<JObject>>(response["sceneItems"].ToString()); | ||
| } | ||
|
|
||
| /// <summary> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need all this in the test client?
Overall groups should be avoided per the Websocket documentation:
"Using groups at all in OBS is discouraged, as they are very broken under the hood."
https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#getgroupsceneitemlist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we don't. If I recall correctly, the previous code received and used that info for free from the old API. I was operating under the premise that I would mimic that behavior.