Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# Syncplay
![GitHub Actions build status](https://github.com/Syncplay/syncplay/workflows/Build/badge.svg)

Solution to synchronize video playback across multiple instances of mpv, VLC, MPC-HC, MPC-BE and mplayer2 over the Internet.
Solution to synchronize video playback across multiple instances of mpv, VLC, MPC-HC, MPC-BE, PotPlayer and mplayer2 over the Internet.

## Official website
https://syncplay.pl
Expand Down
17 changes: 17 additions & 0 deletions syncplay/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@ def getValueForOS(constantDict):
r"c:\program files\mpc-be\mpc-be64.exe",
r"c:\program files\mpc-be\mpc-be.exe"
]
POTPLAYER_PATHS = [
r"c:\program files\daum\potplayer\potplayermini64.exe",
r"c:\program files\daum\potplayer\potplayer64.exe",
r"c:\program files (x86)\daum\potplayer\potplayermini.exe",
r"c:\program files (x86)\daum\potplayer\potplayer.exe"
]
POTPLAYER_EXECUTABLES = ["potplayermini64.exe", "potplayer64.exe", "potplayermini.exe", "potplayer.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",
r"c:\program Files (x86)\mpv\mpv.exe", r"c:\program Files (x86)\mpv-player\mpv.exe",
Expand Down Expand Up @@ -223,6 +230,7 @@ def getValueForOS(constantDict):
MPC_ICONPATH = "mpc-hc.png"
MPC64_ICONPATH = "mpc-hc64.png"
MPC_BE_ICONPATH = "mpc-be.png"
POTPLAYER_ICONPATH = "potplayer.png"

MPV_ERROR_MESSAGES_TO_REPEAT = ['[ytdl_hook] Your version of youtube-dl is too old', '[ytdl_hook] youtube-dl failed', 'Failed to recognize file format.', '[syncplayintf] Lua error']

Expand All @@ -234,6 +242,15 @@ def getValueForOS(constantDict):
MPC_RETRY_WAIT_TIME = 0.01
MPC_MAX_RETRIES = 30
MPC_PAUSE_TOGGLE_DELAY = 0.05
POTPLAYER_OPEN_MAX_WAIT_TIME = 15
POTPLAYER_OPEN_FILE_TIMEOUT = 10
POTPLAYER_COMMAND_TIMEOUT = 1000 # Milliseconds
POTPLAYER_POLL_INTERVAL = 0.005
POTPLAYER_FULL_POLL_EVERY = 10 # Title, duration and speed are read on every Nth poll only
POTPLAYER_SEEK_SETTLE_TIME = 1.0
POTPLAYER_NEWFILE_SETTLE_TIMEOUT = 3.0
POTPLAYER_NEWFILE_ENFORCE_TIME = 1.5
POTPLAYER_SEEK_LANDING_MARGIN = 300 # Milliseconds; exact seeks land within a frame, stale time refreshes on the old timeline
MPV_NEWFILE_IGNORE_TIME = 1
MPV_SENDMESSAGE_COOLDOWN_TIME = 0.05
MPV_MAX_NEWFILE_COOLDOWN_TIME = 3
Expand Down
9 changes: 6 additions & 3 deletions syncplay/messages_en.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,13 @@
"mpc-slave-error": "Unable to start MPC in slave mode!",
"mpc-version-insufficient-error": "MPC version not sufficient, please use `mpc-hc` >= `{}`",
"mpc-be-version-insufficient-error": "MPC version not sufficient, please use `mpc-be` >= `{}`",
"potplayer-launch-error": "Unable to start PotPlayer or find its window!",
"potplayer-file-open-error": "PotPlayer could not open \"{}\"",
"potplayer-keyframe-seek-warning": "PotPlayer jumped to a keyframe instead of the exact time, which makes syncing less accurate. In PotPlayer, turn off \"Playback > Jump (to) > Use keyframe to jump to a time\".",
"mpv-version-error": "Syncplay is not compatible with this version of mpv. Please use a different version of mpv (e.g. Git HEAD).",
"mpv-failed-advice": "The reason mpv cannot start may be due to the use of unsupported command line arguments or an unsupported version of mpv.",
"player-file-open-error": "Player failed opening file",
"player-path-error": "Player path is not set properly. Supported players are: mpv, mpv.net, VLC, MPC-HC, MPC-BE, mplayer2, and IINA",
"player-path-error": "Player path is not set properly. Supported players are: mpv, mpv.net, VLC, MPC-HC, MPC-BE, PotPlayer, mplayer2, and IINA",
"hostname-empty-error": "Hostname can't be empty",
"empty-error": "{} can't be empty", # Configuration
"media-player-error": "Media player error: \"{}\"", # Error line
Expand All @@ -150,7 +153,7 @@

"unable-to-start-client-error": "Unable to start client",

"player-path-config-error": "Player path is not set properly. Supported players are: mpv, mpv.net, VLC, MPC-HC, MPC-BE, mplayer2, and IINA.",
"player-path-config-error": "Player path is not set properly. Supported players are: mpv, mpv.net, VLC, MPC-HC, MPC-BE, PotPlayer, mplayer2, and IINA.",
"no-file-path-config-error": "File must be selected before starting your player",
"no-hostname-config-error": "Hostname can't be empty",
"invalid-port-config-error": "Port must be valid",
Expand Down Expand Up @@ -429,7 +432,7 @@

"edit-rooms-tooltip": "Edit room list.",

"executable-path-tooltip": "Location of your chosen supported media player (mpv, mpv.net, VLC, MPC-HC/BE, mplayer2 or IINA).",
"executable-path-tooltip": "Location of your chosen supported media player (mpv, mpv.net, VLC, MPC-HC/BE, PotPlayer, mplayer2 or IINA).",
"media-path-tooltip": "Location of video or stream to be opened. Necessary for mplayer2.",
"player-arguments-tooltip": "Additional command line arguments / switches to pass on to this media player.",
"mediasearcdirectories-arguments-tooltip": "Directories where Syncplay will search for media files, e.g. when you are using the click to switch feature. Syncplay will look recursively through subfolders.",
Expand Down
7 changes: 6 additions & 1 deletion syncplay/players/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
except ImportError:
from syncplay.players.basePlayer import DummyPlayer
MpcBePlayer = DummyPlayer
try:
from syncplay.players.potplayer import PotPlayer
except ImportError:
from syncplay.players.basePlayer import DummyPlayer
PotPlayer = DummyPlayer
try:
from syncplay.players.iina import IinaPlayer
except ImportError:
Expand All @@ -22,4 +27,4 @@


def getAvailablePlayers():
return [MPCHCAPIPlayer, MpvPlayer, MpvnetPlayer, MementoPlayer, VlcPlayer, MpcBePlayer, MplayerPlayer, IinaPlayer]
return [MPCHCAPIPlayer, MpvPlayer, MpvnetPlayer, MementoPlayer, VlcPlayer, MpcBePlayer, PotPlayer, MplayerPlayer, IinaPlayer]
Loading