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.11k stars 214 forks source link

Tries to run /Application/VLC.app #91

Closed edanluna closed 8 years ago

edanluna commented 8 years ago

I follow the instructions to install syncplay. With mpv I can see the movie but with VLC y get:

 File "/Users/eald/syncplay/syncplay/players/vlc.py", line 205, in run
    vlc = VlcPlayer(client, VlcPlayer.getExpandedPath(playerPath), filePath, args)
  File "/Users/eald/syncplay/syncplay/players/vlc.py", line 55, in __init__
    self._listener = self.__Listener(self, playerPath, filePath, args, self._vlcready, self._vlcclosed)
  File "/Users/eald/syncplay/syncplay/players/vlc.py", line 317, in __init__
    self.__process = subprocess.Popen(call, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
  File "/Users/eald/miniconda2/envs/syncplay/lib/python2.7/subprocess.py", line 710, in __init__
   errread, errwrite)
  File "/Users/eald/miniconda2/envs/syncplay/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
exceptions.OSError: [Errno 13] Permission denied

After some exploration syncplay tries to run /Application/VLC.app which is the text that is show by default in the UI. I assume it is related.

I don't know the reason for this to happen or if you don't consider a problem but when I go back and select the complete path of VLC it works. I'm not used to how mac works but I would assume that some people will find the error and it is just an UI issue, to make it clear that you have to select the full path of the binary or to deduce the path of the binary.

Et0h commented 8 years ago

I don't use OS X. If /Applications/VLC.app/Contents/MacOS/VLC is the wrong path then what is the 'complete path of VLC' that you reckon Syncplay should be suggesting?

edanluna commented 8 years ago

My bad, that is not the issue. The issue is that Syncplay chooses /Applications/VLC.app/ (at least in my computer) when I select VLC in the Open Dialog as the full path for VLC, instead of /Applications/VLC.app/Contents/MacOS/VLC.

When I click in the arrow right to the textbox THEN I see the full path as an option.

Steps to reproduce:

  1. Open Syncplay
  2. Click Browse to search for a player
  3. Click open
  4. Path to player media player textbox has: /Applications/VLC.app as content
  5. Syncplay tries to use the folder as the player and fails.

Expected behavior: Either:

All in all is just an UI/Usability issue.

As a python newbie what happened to me is that I saw the error in the terminal first, then I saw that mpv didn't have that problem at all. So went and compared the code of both classes in the Syncplay code until I figured out that both players VLC and mpv have the same code for expanding the path so it couldn't be something that the player Factory or anything like that could be doing (I avoid UI code as much as I can) and decided to make this ticket and THEN I saw the drop down arrow where the full path of VLC was instead of the short one that have been plaguing me.

Et0h commented 8 years ago

Thanks for bringing this issue to light. I've mentioned this problem at https://github.com/Syncplay/syncplay/issues/81 so hopefully we'll find someone who will be able to code and test a fix for this. For people who use a Mac and know Python I'm guessing it won't be too hard to solve based on your suggested expected behaviour. If it is possible, just correcting the location as appropriate would be nicer than having to give a warning.

Et0h commented 8 years ago

Hopefully nilsding's commit fixes this problem :)