Detect portable versions of MPC-HC, MPC-BE and VLC
This commit is contained in:
parent
b4292bf8cd
commit
ce2c37623a
@ -496,7 +496,7 @@ class MPCHCAPIPlayer(BasePlayer):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def getExpandedPath(path):
|
def getExpandedPath(path):
|
||||||
if os.path.isfile(path):
|
if os.path.isfile(path):
|
||||||
if path.lower().endswith('mpc-hc.exe'.lower()) or path.lower().endswith('mpc-hc64.exe'.lower()) or path.lower().endswith('mpc-hc64_nvo.exe'.lower()) or path.lower().endswith('mpc-hc_nvo.exe'.lower()):
|
if path.lower().endswith('mpc-hc.exe'.lower()) or path.lower().endswith('mpc-hcportable.exe'.lower()) or path.lower().endswith('mpc-hc64.exe'.lower()) or path.lower().endswith('mpc-hc64_nvo.exe'.lower()) or path.lower().endswith('mpc-hc_nvo.exe'.lower()):
|
||||||
return path
|
return path
|
||||||
if os.path.isfile(path + "mpc-hc.exe"):
|
if os.path.isfile(path + "mpc-hc.exe"):
|
||||||
path += "mpc-hc.exe"
|
path += "mpc-hc.exe"
|
||||||
@ -504,6 +504,12 @@ class MPCHCAPIPlayer(BasePlayer):
|
|||||||
if os.path.isfile(path + "\\mpc-hc.exe"):
|
if os.path.isfile(path + "\\mpc-hc.exe"):
|
||||||
path += "\\mpc-hc.exe"
|
path += "\\mpc-hc.exe"
|
||||||
return path
|
return path
|
||||||
|
if os.path.isfile(path + "mpc-hcportable.exe"):
|
||||||
|
path += "mpc-hcportable.exe"
|
||||||
|
return path
|
||||||
|
if os.path.isfile(path + "\\mpc-hcportable.exe"):
|
||||||
|
path += "\\mpc-hcportable.exe"
|
||||||
|
return path
|
||||||
if os.path.isfile(path + "mpc-hc_nvo.exe"):
|
if os.path.isfile(path + "mpc-hc_nvo.exe"):
|
||||||
path += "mpc-hc_nvo.exe"
|
path += "mpc-hc_nvo.exe"
|
||||||
return path
|
return path
|
||||||
|
|||||||
@ -30,7 +30,7 @@ class MpcBePlayer(MPCHCAPIPlayer):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def getExpandedPath(path):
|
def getExpandedPath(path):
|
||||||
if os.path.isfile(path):
|
if os.path.isfile(path):
|
||||||
if path.lower().endswith('mpc-be.exe'.lower()) or path.lower().endswith('mpc-be64.exe'.lower()):
|
if path.lower().endswith('mpc-be.exe'.lower()) or path.lower().endswith('mpc-be64.exe'.lower() or path.lower().endswith('mpc-beportable.exe'.lower())):
|
||||||
return path
|
return path
|
||||||
if os.path.isfile(path + "mpc-be.exe"):
|
if os.path.isfile(path + "mpc-be.exe"):
|
||||||
path += "mpc-be.exe"
|
path += "mpc-be.exe"
|
||||||
@ -38,6 +38,12 @@ class MpcBePlayer(MPCHCAPIPlayer):
|
|||||||
if os.path.isfile(path + "\\mpc-be.exe"):
|
if os.path.isfile(path + "\\mpc-be.exe"):
|
||||||
path += "\\mpc-be.exe"
|
path += "\\mpc-be.exe"
|
||||||
return path
|
return path
|
||||||
|
if os.path.isfile(path + "mpc-beportable.exe"):
|
||||||
|
path += "mpc-beportable.exe"
|
||||||
|
return path
|
||||||
|
if os.path.isfile(path + "\\mpc-beportable.exe"):
|
||||||
|
path += "\\mpc-beportable.exe"
|
||||||
|
return path
|
||||||
if os.path.isfile(path + "mpc-be64.exe"):
|
if os.path.isfile(path + "mpc-be64.exe"):
|
||||||
path += "mpc-be64.exe"
|
path += "mpc-be64.exe"
|
||||||
return path
|
return path
|
||||||
|
|||||||
@ -285,6 +285,12 @@ class VlcPlayer(BasePlayer):
|
|||||||
elif os.path.isfile(playerPath + "\\vlc.exe"):
|
elif os.path.isfile(playerPath + "\\vlc.exe"):
|
||||||
playerPath += "\\vlc.exe"
|
playerPath += "\\vlc.exe"
|
||||||
return playerPath
|
return playerPath
|
||||||
|
elif os.path.isfile(playerPath + "VLCPortable.exe"):
|
||||||
|
playerPath += "VLCPortable.exe"
|
||||||
|
return playerPath
|
||||||
|
elif os.path.isfile(playerPath + "\\VLCPortable.exe"):
|
||||||
|
playerPath += "\\VLCPortable.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(':'):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user