From b568652824c7438c11d4cf6f74bc9ffde1221353 Mon Sep 17 00:00:00 2001 From: Etoh Date: Wed, 27 Dec 2017 20:40:25 +0000 Subject: [PATCH] Add support for K-Lite version of MPC-HC --- syncplay/players/mpc.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/syncplay/players/mpc.py b/syncplay/players/mpc.py index 1dc3064..c274ef7 100644 --- a/syncplay/players/mpc.py +++ b/syncplay/players/mpc.py @@ -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 +