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

Client doesn't detect File loaded when using Mpv with --msg-module flag #134

Closed
Felhamed opened this Issue May 2, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@Felhamed

Felhamed commented May 2, 2017

Syncplay client version : 1.4.0 OS: 4.10.11-1-Arch Linux
Syncplay Debug logs: https://pastebin.com/raw/Qn9gUA3e

Description:
When using the flag --msg-module in mpv.conf the client isn't able to detect that a file has been loaded. Tested by commenting out msg-module flag and Syncplay works as expected.

 #msg-module                             # prepend module name to log messages
 msg-color                               # color log messages on terminal

Edit: This isn't really an issue but I did a bunch of troubleshooting since I wasn't able to load the file with my mpv.conf vs running it with no conf and narrowed down to this flag.

@Et0h

This comment has been minimized.

Show comment
Hide comment
@Et0h

Et0h May 7, 2017

Contributor

Nice research. Does this resolve the issue satisfactorily?

+++ syncplay/players/mplayer.py
@@ -168,6 +168,8 @@
     def lineReceived(self, line):
         if line:
             self._client.ui.showDebugMessage("player << {}".format(line))
+            line = line.replace("   cplayer: ","")  # --msg-module workaround
+            line = line.replace("  term-msg: ", "")
         if "Failed to get value of property" in line or "=(unavailable)" in line or line == "ANS_filename=" or line == "ANS_length=" or line == "ANS_path=":
             if "filename" in line:
                 self._getFilename()
Contributor

Et0h commented May 7, 2017

Nice research. Does this resolve the issue satisfactorily?

+++ syncplay/players/mplayer.py
@@ -168,6 +168,8 @@
     def lineReceived(self, line):
         if line:
             self._client.ui.showDebugMessage("player << {}".format(line))
+            line = line.replace("   cplayer: ","")  # --msg-module workaround
+            line = line.replace("  term-msg: ", "")
         if "Failed to get value of property" in line or "=(unavailable)" in line or line == "ANS_filename=" or line == "ANS_length=" or line == "ANS_path=":
             if "filename" in line:
                 self._getFilename()
@Felhamed

This comment has been minimized.

Show comment
Hide comment
@Felhamed

Felhamed May 7, 2017

Confirmed that fix resolved it, works perfectly. Thanks

Felhamed commented May 7, 2017

Confirmed that fix resolved it, works perfectly. Thanks

@Et0h

This comment has been minimized.

Show comment
Hide comment
@Et0h

Et0h May 7, 2017

Contributor

Excellent. Thanks for your support in squashing this bug :)

Contributor

Et0h commented May 7, 2017

Excellent. Thanks for your support in squashing this bug :)

@Et0h Et0h closed this May 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment