mirror of
https://github.com/Syncplay/syncplay
synced 2025-02-17 11:26:52 +00:00
Add support for mpv installed from microsoft store (#662)
Co-authored-by: Etoh <etoh@syncplay.pl>
This commit is contained in:
parent
64ea98ac1c
commit
feff5026b1
@ -180,6 +180,7 @@ try:
|
|||||||
import os
|
import os
|
||||||
MPVNET_PATHS.append(os.path.expandvars(r'%LOCALAPPDATA%\Microsoft\WindowsApps\mpvnet.exe'))
|
MPVNET_PATHS.append(os.path.expandvars(r'%LOCALAPPDATA%\Microsoft\WindowsApps\mpvnet.exe'))
|
||||||
MPVNET_PATHS.append(os.path.expandvars(r'%LOCALAPPDATA%\Programs\mpv.net\mpvnet.exe'))
|
MPVNET_PATHS.append(os.path.expandvars(r'%LOCALAPPDATA%\Programs\mpv.net\mpvnet.exe'))
|
||||||
|
MPV_PATHS.append(os.path.expandvars(r'%LOCALAPPDATA%\Microsoft\WindowsApps\mpv.exe'))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
VLC_PATHS = [
|
VLC_PATHS = [
|
||||||
|
@ -13,6 +13,7 @@ from syncplay.messages import getMessage
|
|||||||
from syncplay.players.basePlayer import BasePlayer
|
from syncplay.players.basePlayer import BasePlayer
|
||||||
from syncplay.utils import getRuntimeDir, isURL, findResourcePath
|
from syncplay.utils import getRuntimeDir, isURL, findResourcePath
|
||||||
from syncplay.utils import isMacOS, isWindows, isASCII
|
from syncplay.utils import isMacOS, isWindows, isASCII
|
||||||
|
from syncplay.utils import playerPathExists
|
||||||
from syncplay.vendor.python_mpv_jsonipc.python_mpv_jsonipc import MPV
|
from syncplay.vendor.python_mpv_jsonipc.python_mpv_jsonipc import MPV
|
||||||
|
|
||||||
class MpvPlayer(BasePlayer):
|
class MpvPlayer(BasePlayer):
|
||||||
@ -91,11 +92,11 @@ class MpvPlayer(BasePlayer):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def getExpandedPath(playerPath):
|
def getExpandedPath(playerPath):
|
||||||
if not os.path.isfile(playerPath):
|
if not playerPathExists(playerPath):
|
||||||
if os.path.isfile(playerPath + "mpv.exe"):
|
if playerPathExists(playerPath + "mpv.exe"):
|
||||||
playerPath += "mpv.exe"
|
playerPath += "mpv.exe"
|
||||||
return playerPath
|
return playerPath
|
||||||
elif os.path.isfile(playerPath + "\\mpv.exe"):
|
elif playerPathExists(playerPath + "\\mpv.exe"):
|
||||||
playerPath += "\\mpv.exe"
|
playerPath += "\\mpv.exe"
|
||||||
return playerPath
|
return playerPath
|
||||||
if os.access(playerPath, os.X_OK):
|
if os.access(playerPath, os.X_OK):
|
||||||
|
Loading…
Reference in New Issue
Block a user