From 7701772ba0946ea8364a5320151d73540865489a Mon Sep 17 00:00:00 2001 From: Etoh Date: Mon, 14 Oct 2013 15:25:53 +0100 Subject: [PATCH] Improve mplayer expandedpath --- syncplay/players/mplayer.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/syncplay/players/mplayer.py b/syncplay/players/mplayer.py index 5b9c30e..4a9efa8 100644 --- a/syncplay/players/mplayer.py +++ b/syncplay/players/mplayer.py @@ -159,9 +159,13 @@ class MplayerPlayer(BasePlayer): @staticmethod def getExpandedPath(playerPath): - if(os.path.isfile(playerPath + u"\\mplayer.exe")): - playerPath += u"\\mplayer.exe" - return playerPath + if not os.path.isfile(playerPath): + if os.path.isfile(playerPath + u"mplayer.exe"): + playerPath += u"mplayer.exe" + return playerPath + elif os.path.isfile(playerPath + u"\\mplayer.exe"): + playerPath += u"\\mplayer.exe" + return playerPath if os.access(playerPath, os.X_OK): return playerPath for path in os.environ['PATH'].split(':'):