Skip to content
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
Closed

Comments

@Felhamed
Copy link

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
Copy link
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
Copy link
Author

Felhamed commented May 7, 2017

Confirmed that fix resolved it, works perfectly. Thanks

@Et0h
Copy link
Contributor

Et0h commented May 7, 2017

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

@Et0h Et0h closed this as completed May 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants