From 3f588d3b36e3a1a06ecd367f86b77036b1253f22 Mon Sep 17 00:00:00 2001 From: Etoh Date: Mon, 14 Oct 2013 10:25:44 +0100 Subject: [PATCH] Improved vlc expandedpath --- syncplay/players/vlc.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/syncplay/players/vlc.py b/syncplay/players/vlc.py index 9a6637d..9cfdbf1 100644 --- a/syncplay/players/vlc.py +++ b/syncplay/players/vlc.py @@ -175,9 +175,13 @@ class VlcPlayer(BasePlayer): @staticmethod def getExpandedPath(playerPath): - if(os.path.isfile(playerPath + u"\\vlc.exe")): - playerPath += u"\\vlc.exe" - return playerPath + if not os.path.isfile(playerPath): + if os.path.isfile(playerPath + u"vlc.exe"): + playerPath += u"vlc.exe" + return playerPath + elif os.path.isfile(playerPath + u"\\vlc.exe"): + playerPath += u"\\vlc.exe" + return playerPath if os.access(playerPath, os.X_OK): return playerPath for path in os.environ['PATH'].split(':'):