For each option, you create an associated entry in /syncplay/ui/ConfigurationGetter.py.The unusual bit is that we use getMessage() to get the help info for the argument, and this means it then needs to specify the name of a message associated with entries in /syncplay/messages_en.py, messages_it.py, etc. See for more details on how argparser works, or figure it out from our code.The command line options are specified in /syncplay/ui/ConfigurationGetter.py as part of the getConfiguration method using self._argparser.add_argument functions.This could list all files from a folder, or you could support regex or whatever to allow for more advanced generation of playlists.Ī few notes on adding command line options to Syncplay: You could also code a -generate-playlist-from-folder' command line option within Syncplay.This would load a one-item-per-line playlist from a text file. You could code a '-load-playlist-from-file' command line option within Syncplay.You could, for example, implement a CLI option to load and save the playlist to a text file. At present console.py does not implement the setPlaylist command and does not invoke syncpla圜. The only problem with CLI mode is that it doesn't currently allow you to control the playlist.Syncplay has a CLI (command line interface) mode which you can invoke using -no-gui as per - I don't use Linux, but I assume if you run a CLI app as a child then you can control the input/output.It uses set commands for playlistIndex and playlistChange. This doesn't include an explanation of the playlist, but you can see how that works by looking at or running Syncplay in -debug mode and seeing the communication. For details of the Syncplay protocol see for details of the basics.Syncplay's protocol is a custom JSON over TCP/IP protocol, not IRC.Syncplay wasn't specifically designed to be hacked in that way, so your code was an interesting read.If a command line argument to only add the files and then quit was added, this could be used by other programs freely without having to emulate the protocol. You can already open syncplay with a file argument, but that does not modify the playlist and instead plays the file directly. That would be enough for my case, but there are alternatives to consider.Ī different use case would be to open a folder from CLI with syncplay and have all its files be added to the playlist, or provide a list of files through shell globbing. Since syncplay already is a client and we have a way to modify the server's state with a different client without issues, I don't think providing an IPC interface through sockets or pipes would be worthwhile.Īfaik syncplay uses IRC as the underlying protocol, so the easiest solution for me would be to emulate the protocol and use an existing IRC library to add the files with a "bot" user that joins a room, sends the necessary commands and then quits. In order to do that, I need a CLI or IPC interface. The fact that you can enjoy watching at the same time means that you can create virtual cinema sessions where all your devices are in sync.I would like to automate construction of the playlist based on a library and an a database of episodes I haven't watched yet. Syncplay is one of those programs that are very useful for enjoying movies with your friends even if you're watching in different houses. In addition to this, the program is also able to run on different platforms, such as Windows or Linux, so that any user can connect without a problem. One of the strengths of Syncplay is that the program is fully compatible with several widely used players such as VLC. After this, the other people must enter the same server you created so it starts playing at the same time on each Mac. To do this, you just have to run the player you want to watch your content on. Playing a movie or TV series in sync on multiple computers is Syncplay's main function. Doing this allows you to easily play any content in sync on each computer. Syncplay is a tool for Mac for syncing some of the video players that you and your friends or family both have installed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |