Detect portable versions of MPC-HC, MPC-BE and VLC
This commit is contained in:
parent
3b6996f7ab
commit
c55e668c0d
@ -496,7 +496,7 @@ class MPCHCAPIPlayer(BasePlayer):
|
||||
@staticmethod
|
||||
def getExpandedPath(path):
|
||||
if os.path.isfile(path):
|
||||
if path.lower().endswith(u'mpc-hc.exe'.lower()) or path.lower().endswith(u'mpc-hc64.exe'.lower()) or path.lower().endswith(u'mpc-hc64_nvo.exe'.lower()) or path.lower().endswith(u'mpc-hc_nvo.exe'.lower()):
|
||||
if path.lower().endswith(u'mpc-hc.exe'.lower()) or path.lower().endswith(u'mpc-hcportable.exe'.lower()) or path.lower().endswith(u'mpc-hc64.exe'.lower()) or path.lower().endswith(u'mpc-hc64_nvo.exe'.lower()) or path.lower().endswith(u'mpc-hc_nvo.exe'.lower()):
|
||||
return path
|
||||
if os.path.isfile(path + u"mpc-hc.exe"):
|
||||
path += u"mpc-hc.exe"
|
||||
@ -504,6 +504,12 @@ class MPCHCAPIPlayer(BasePlayer):
|
||||
if os.path.isfile(path + u"\\mpc-hc.exe"):
|
||||
path += u"\\mpc-hc.exe"
|
||||
return path
|
||||
if os.path.isfile(path + u"mpc-hcportable.exe"):
|
||||
path += u"mpc-hcportable.exe"
|
||||
return path
|
||||
if os.path.isfile(path + u"\\mpc-hcportable.exe"):
|
||||
path += u"\\mpc-hcportable.exe"
|
||||
return path
|
||||
if os.path.isfile(path + u"mpc-hc_nvo.exe"):
|
||||
path += u"mpc-hc_nvo.exe"
|
||||
return path
|
||||
|
||||
@ -30,7 +30,7 @@ class MpcBePlayer(MPCHCAPIPlayer):
|
||||
@staticmethod
|
||||
def getExpandedPath(path):
|
||||
if os.path.isfile(path):
|
||||
if path.lower().endswith(u'mpc-be.exe'.lower()) or path.lower().endswith(u'mpc-be64.exe'.lower()):
|
||||
if path.lower().endswith(u'mpc-be.exe'.lower()) or path.lower().endswith(u'mpc-be64.exe'.lower() or path.lower().endswith(u'mpc-beportable.exe'.lower())):
|
||||
return path
|
||||
if os.path.isfile(path + u"mpc-be.exe"):
|
||||
path += u"mpc-be.exe"
|
||||
@ -38,6 +38,12 @@ class MpcBePlayer(MPCHCAPIPlayer):
|
||||
if os.path.isfile(path + u"\\mpc-be.exe"):
|
||||
path += u"\\mpc-be.exe"
|
||||
return path
|
||||
if os.path.isfile(path + u"mpc-beportable.exe"):
|
||||
path += u"mpc-beportable.exe"
|
||||
return path
|
||||
if os.path.isfile(path + u"\\mpc-beportable.exe"):
|
||||
path += u"\\mpc-beportable.exe"
|
||||
return path
|
||||
if os.path.isfile(path + u"mpc-be64.exe"):
|
||||
path += u"mpc-be64.exe"
|
||||
return path
|
||||
|
||||
@ -285,6 +285,11 @@ class VlcPlayer(BasePlayer):
|
||||
elif os.path.isfile(playerPath + u"\\vlc.exe"):
|
||||
playerPath += u"\\vlc.exe"
|
||||
return playerPath
|
||||
elif os.path.isfile(playerPath + u"VLCPortable.exe"):
|
||||
playerPath += u"VLCPortable.exe"
|
||||
elif os.path.isfile(playerPath + u"\\VLCPortable.exe"):
|
||||
playerPath += u"\\VLCPortable.exe"
|
||||
return playerPath
|
||||
if os.access(playerPath, os.X_OK):
|
||||
return playerPath
|
||||
for path in os.environ['PATH'].split(':'):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user