Syncplay / syncplay

Client/server to synchronize media playback on mpv/VLC/MPC-HC/MPC-BE on many computers
http://syncplay.pl/
Apache License 2.0
2.07k stars 211 forks source link

Even after disabling 'Enable chat output in media player' chat messages is still shown #610

Open soredake opened 1 year ago

soredake commented 1 year ago

Describe the bug Even after disabling 'Enable chat output in media player' chat messages is still shown in mpv.net.

To Reproduce Steps to reproduce the behavior:

  1. Configure syncplay to use mpv.net.
  2. Disable 'Enable chat output in media player'.
  3. Run syncplay.
  4. Press enter and send some message.
  5. Chat message will be shown despite relevant setting is off.

Expected behavior No chat messages.

Version and platform:

Additional context Add any other context about the problem here.

Et0h commented 1 year ago

I think there might be a mismatch between what people might expect from how it is described and how it was originally intended and ultimately implemented.

Historically Syncplay only ever supported one-line-at-a-time OSD, which was fine for most purposes but didn't support multiple chat messages being shown at once.

For most players it wasn't possible to do that in a reliable way, but for mpv I could do so by bypassing the normal OSD system and instead using a custom OSD system to better support chat. It is this special OSD which I was referring to when I added the "Enable chat output in media player (mpv only for now)".

So if that feature is enabled, chat messages show up on multiple lines and if it is disabled it shows up on the top line (if OSD messages overall are enabled).

I'm reluctant to change the behaviour of a long-implemented option, but I would be happy to consider (a) tweaking the wording to make it more clear what the option means, and (b) having an explicit option to allow people to enable/disable chat messages (which is the behaviour you were expecting for the "Enable chat output" option) in the messages tab.

visua0 commented 7 months ago

Regardless of what this setting does, disabling it causes an error for me on closing Syncplay:

Errors in 'Syncplay.exe'
See the logfile '[...]\Syncplay.log' for details

Here's what's in the log:

Click to see log contents

``` Unhandled Error Traceback (most recent call last): File "syncplay\clientManager.pyc", line 16, in run File "syncplay\client.pyc", line 894, in start File "syncplay\vendor\qt5reactor.pyc", line 303, in run File "syncplay\vendor\qt5reactor.pyc", line 187, in write --- --- File "twisted\python\log.pyc", line 96, in callWithLogger File "twisted\python\log.pyc", line 80, in callWithContext File "twisted\python\context.pyc", line 117, in callWithContext File "twisted\python\context.pyc", line 82, in callWithContext File "syncplay\vendor\qt5reactor.pyc", line 182, in _write File "twisted\internet\posixbase.pyc", line 110, in _disconnectSelectable File "twisted\internet\tcp.pyc", line 508, in connectionLost File "twisted\internet\tcp.pyc", line 326, in connectionLost File "twisted\protocols\tls.pyc", line 409, in connectionLost File "twisted\protocols\policies.pyc", line 114, in connectionLost File "twisted\internet\endpoints.pyc", line 163, in connectionLost File "twisted\application\internet.pyc", line 465, in connectionLost File "twisted\application\internet.pyc", line 658, in File "automat\_methodical.pyc", line 242, in _clientDisconnected File "automat\_methodical.pyc", line 281, in __call__ File "twisted\application\internet.pyc", line 778, in _wait File "twisted\application\internet.pyc", line 789, in _doWait File "syncplay\client.pyc", line 871, in retry File "syncplay\client.pyc", line 1669, in showMessage File "syncplay\client.pyc", line 1702, in showOSDMessage File "syncplay\players\mpv.pyc", line 133, in displayMessage File "syncplay\vendor\python_mpv_jsonipc\python_mpv_jsonipc.pyc", line 598, in wrapper File "syncplay\vendor\python_mpv_jsonipc\python_mpv_jsonipc.pyc", line 631, in command File "syncplay\vendor\python_mpv_jsonipc\python_mpv_jsonipc.pyc", line 328, in command File "syncplay\vendor\python_mpv_jsonipc\python_mpv_jsonipc.pyc", line 88, in send File "syncplay\vendor\python_mpv_jsonipc\python_mpv_jsonipc.pyc", line 86, in send File "multiprocessing\connection.pyc", line 183, in send_bytes File "multiprocessing\connection.pyc", line 136, in _check_closed builtins.OSError: handle is closed ```

Enabling chat output again gets rid of this error.