Improve MPV expandedpath

This commit is contained in:
Etoh 2013-10-14 15:26:52 +01:00
parent 7701772ba0
commit e12e772af3

View File

@ -25,9 +25,13 @@ class MpvPlayer(MplayerPlayer):
@staticmethod @staticmethod
def getExpandedPath(playerPath): def getExpandedPath(playerPath):
if(os.path.isfile(playerPath + u"\\mpv.exe")): if not os.path.isfile(playerPath):
playerPath += u"\\mpv.exe" if os.path.isfile(playerPath + u"mpv.exe"):
return playerPath 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): if os.access(playerPath, os.X_OK):
return playerPath return playerPath
for path in os.environ['PATH'].split(':'): for path in os.environ['PATH'].split(':'):