Closed xNinjaKittyx closed 6 years ago
What information do you want and is it from a server you control?
Not fully up to date, but the Syncplay protocol is explained at http://syncplay.pl/about/protocol/ and Syncplay is open source.
I was looking at the protocol earlier, and I was wondering if it was possible to grab the "Request list of who is playing what in which room."
I was just playing around with my own server and trying to use sockets or requests. Requests just gives me "not a json encoded string" regardless of what input i give it.
Yes, strings need to be JSON encoded.
Two relevant questions:
If --isolate-room is not enabled you can just connect to the server using the same strings as Syncplay, login, perform a userlist check, then leave. Without modification you can't get the userlist without logging in first.
If the server is using --isolate-room (and if you want to avoid people seeing the script entering and exiting a room) then you will need to modify protocols.py/server.py to output the information to a local connector (e.g. through a modified version of sendList and/or handleList).
1) --isolate-room is not enabled 2) it is a server I am running on my own computer.
Also, through requests, I am sending JSON-compliant strings. I don't if that counts the same as what you are defining as a "JSON Encoded string".
Personally, it doesn't matter to me if the room sees the script entering and exiting. I just want to be able to grab List Messages.
Ensure a { at the very beginning of your JSON-encoded string. A { was omitted from the protocol page for the initial hello message but that has now been corrected. If that doesn't work then please share your code (or try it using Telnet or similar).
I would like to be able to connect to syncplay with a python script and grab some data from it. Is there any way currently to be able to do it? (v. 1.4.0)