From 366a686ab3d2eb7f491f1c0f923afe2f778f2a60 Mon Sep 17 00:00:00 2001 From: ImportTaste <53661808+ImportTaste@users.noreply.github.com> Date: Sun, 29 Aug 2021 05:18:55 -0500 Subject: [PATCH] Support for LAV Filters Megamix (#457) --- syncplay/constants.py | 14 ++++++++------ syncplay/players/mpc.py | 11 +++++++++-- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/syncplay/constants.py b/syncplay/constants.py index e6ab70e..5d3c5ee 100755 --- a/syncplay/constants.py +++ b/syncplay/constants.py @@ -150,17 +150,19 @@ MPC_PATHS = [ r"c:\program files (x86)\media player classic - home cinema\mpc-hc.exe", r"c:\program files (x86)\k-lite codec pack\media player classic\mpc-hc.exe", r"c:\program files\k-lite codec pack\media Player classic\mpc-hc.exe", - r"C:\program files\k-lite codec pack\mpc-hc64\mpc-hc64.exe", - r"C:\program files (x86)\k-lite codec pack\mpc-hc64\mpc-hc64.exe", + r"c:\program files\k-lite codec pack\mpc-hc64\mpc-hc64.exe", + r"c:\program files (x86)\k-lite codec pack\mpc-hc64\mpc-hc64.exe", r"c:\program files (x86)\combined community codec pack\mpc\mpc-hc.exe", r"c:\program files\combined community codec pack\mpc\mpc-hc.exe", r"c:\program files\mpc homecinema (x64)\mpc-hc64.exe", + r"c:\program files (x86)\lav filters\x86\mpc-hc\shoukaku.exe", + r"c:\program files (x86)\lav filters\x64\mpc-hc\shoukaku.exe" ] MPC_BE_PATHS = [ - r"c:\Program Files\MPC-BE x64\mpc-be64.exe", - r"c:\Program Files\MPC-BE x64\mpc-be.exe", - r"c:\Program Files\MPC-BE\mpc-be64.exe", - r"c:\Program Files\MPC-BE\mpc-be.exe" + r"c:\program files\mpc-be x64\mpc-be64.exe", + r"c:\program files\mpc-be x64\mpc-be.exe", + r"c:\program files\mpc-be\mpc-be64.exe", + r"c:\program files\mpc-be\mpc-be.exe" ] MPLAYER_PATHS = ["mplayer2", "mplayer"] MPV_PATHS = ["mpv", "/opt/mpv/mpv", r"c:\program files\mpv\mpv.exe", r"c:\program files\mpv-player\mpv.exe", diff --git a/syncplay/players/mpc.py b/syncplay/players/mpc.py index d53645a..7eeb4a0 100755 --- a/syncplay/players/mpc.py +++ b/syncplay/players/mpc.py @@ -497,7 +497,8 @@ class MPCHCAPIPlayer(BasePlayer): def getIconPath(path): if ( MPCHCAPIPlayer.getExpandedPath(path).lower().endswith('mpc-hc64.exe'.lower()) or - MPCHCAPIPlayer.getExpandedPath(path).lower().endswith('mpc-hc64_nvo.exe'.lower()) + MPCHCAPIPlayer.getExpandedPath(path).lower().endswith('mpc-hc64_nvo.exe'.lower()) or + MPCHCAPIPlayer.getExpandedPath(path).lower().endswith(r'x64\mpc-hc\shoukaku.exe'.lower()) ): return constants.MPC64_ICONPATH else: @@ -515,7 +516,7 @@ class MPCHCAPIPlayer(BasePlayer): 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()) + path.lower().endswith('mpc-hc_nvo.exe'.lower()) or path.lower().endswith('shoukaku.exe'.lower()) ): return path if os.path.isfile(path + "mpc-hc.exe"): @@ -548,3 +549,9 @@ class MPCHCAPIPlayer(BasePlayer): if os.path.isfile(path + "\\mpc-hc64_nvo.exe"): path += "\\mpc-hc64_nvo.exe" return path + if os.path.isfile(path + "shoukaku.exe"): + path += "shoukaku.exe" + return path + if os.path.isfile(path + "\\shoukaku.exe"): + path += "\\shoukaku.exe" + return path