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