Add support for K-Lite version of MPC-HC

This commit is contained in:
Etoh 2017-12-27 20:40:25 +00:00 committed by GitHub
parent 4674cadca3
commit b568652824
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 2 deletions

View File

@ -479,7 +479,7 @@ class MPCHCAPIPlayer(BasePlayer):
@staticmethod
def getIconPath(path):
if MPCHCAPIPlayer.getExpandedPath(path).lower().endswith(u'mpc-hc64.exe'.lower()):
if MPCHCAPIPlayer.getExpandedPath(path).lower().endswith(u'mpc-hc64.exe'.lower()) or MPCHCAPIPlayer.getExpandedPath(path).lower().endswith(u'mpc-hc64_nvo.exe'.lower()):
return constants.MPC64_ICONPATH
else:
return constants.MPC_ICONPATH
@ -493,7 +493,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()):
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()):
return path
if os.path.isfile(path + u"mpc-hc.exe"):
path += u"mpc-hc.exe"
@ -501,9 +501,22 @@ 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-hc_nvo.exe"):
path += u"mpc-hc_nvo.exe"
return path
if os.path.isfile(path + u"\\mpc-hc_nvo.exe"):
path += u"\\mpc-hc_nvo.exe"
return path
if os.path.isfile(path + u"mpc-hc64.exe"):
path += u"mpc-hc64.exe"
return path
if os.path.isfile(path + u"\\mpc-hc64.exe"):
path += u"\\mpc-hc64.exe"
return path
if os.path.isfile(path + u"mpc-hc64_nvo.exe"):
path += u"mpc-hc64_nvo.exe"
return path
if os.path.isfile(path + u"\\mpc-hc64_nvo.exe"):
path += u"\\mpc-hc64_nvo.exe"
return path