Detect portable versions of MPC-HC, MPC-BE and VLC
This commit is contained in:
parent
c8835cfa66
commit
3f2d28fc99
@ -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(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
|
return path
|
||||||
if os.path.isfile(path + u"mpc-hc.exe"):
|
if os.path.isfile(path + u"mpc-hc.exe"):
|
||||||
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"):
|
if os.path.isfile(path + u"\\mpc-hc.exe"):
|
||||||
path += u"\\mpc-hc.exe"
|
path += u"\\mpc-hc.exe"
|
||||||
return path
|
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"):
|
if os.path.isfile(path + u"mpc-hc_nvo.exe"):
|
||||||
path += u"mpc-hc_nvo.exe"
|
path += u"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(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
|
return path
|
||||||
if os.path.isfile(path + u"mpc-be.exe"):
|
if os.path.isfile(path + u"mpc-be.exe"):
|
||||||
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"):
|
if os.path.isfile(path + u"\\mpc-be.exe"):
|
||||||
path += u"\\mpc-be.exe"
|
path += u"\\mpc-be.exe"
|
||||||
return path
|
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"):
|
if os.path.isfile(path + u"mpc-be64.exe"):
|
||||||
path += u"mpc-be64.exe"
|
path += u"mpc-be64.exe"
|
||||||
return path
|
return path
|
||||||
|
|||||||
@ -285,6 +285,11 @@ class VlcPlayer(BasePlayer):
|
|||||||
elif os.path.isfile(playerPath + u"\\vlc.exe"):
|
elif os.path.isfile(playerPath + u"\\vlc.exe"):
|
||||||
playerPath += u"\\vlc.exe"
|
playerPath += u"\\vlc.exe"
|
||||||
return playerPath
|
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):
|
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