Improve mplayer expandedpath

This commit is contained in:
Etoh 2013-10-14 15:25:53 +01:00
parent 2c454d2ade
commit 7701772ba0

View File

@ -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(':'):