Skip to content

Commit

Permalink
Merge branch 'master' into setOthersReadiness
Browse files Browse the repository at this point in the history
  • Loading branch information
Et0h authored Sep 30, 2024
2 parents 3444e93 + 91b40db commit bd9d233
Show file tree
Hide file tree
Showing 22 changed files with 109 additions and 52 deletions.
2 changes: 1 addition & 1 deletion ci/deb-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Version: "$(
)"
Architecture: all
Maintainer: <[email protected]>
Depends: python3 (>= 3.6), python3-pyside2.qtwidgets, python3-pyside2.qtcore, python3-twisted (>= 16.4.0), python3-certifi, mpv (>= 0.23) | vlc (>= 2.2.1)
Depends: python3 (>= 3.6), python3-pyside2.qtwidgets | python3-pyside6.qtwidgets, python3-pyside2.qtcore | python3-pyside6.qtcore, python3-twisted (>= 16.4.0), python3-certifi, python3-pem, mpv (>= 0.23) | vlc (>= 2.2.1)
Homepage: https://syncplay.pl
Section: web
Priority: optional
Expand Down
4 changes: 2 additions & 2 deletions syncplay/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version = '1.7.2'
version = '1.7.4'
revision = ' development'
milestone = 'Yoitsu'
release_number = '110'
release_number = '113'
projectURL = 'https://syncplay.pl/'
6 changes: 6 additions & 0 deletions syncplay/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ def __init__(self, playerClass, ui, config):
constants.SHOW_SAME_ROOM_OSD = config['showSameRoomOSD']
constants.SHOW_DURATION_NOTIFICATION = config['showDurationNotification']
constants.DEBUG_MODE = config['debug']
constants.FOLDER_SEARCH_FIRST_FILE_TIMEOUT = config['folderSearchFirstFileTimeout']
constants.FOLDER_SEARCH_TIMEOUT = config['folderSearchTimeout']
constants.FOLDER_SEARCH_DOUBLE_CHECK_INTERVAL = config['folderSearchDoubleCheckInterval']

self.controlpasswords = {}
self.lastControlPasswordAttempt = None
Expand Down Expand Up @@ -1795,6 +1798,9 @@ def changeToPlaylistIndexFromFilename(self, filename):
def loadDelayedPath(self, changeToIndex):
# Implementing the behaviour set out at https://github.com/Syncplay/syncplay/issues/315

if not self._client:
return

if self._client.playerIsNotReady():
self._client.addPlayerReadyCallback(lambda x: self.loadDelayedPath(changeToIndex))
return
Expand Down
13 changes: 7 additions & 6 deletions syncplay/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def getValueForOS(constantDict):
UI_TIME_FORMAT = "[%X] "
CONFIG_NAMES = [".syncplay", "syncplay.ini"] # Syncplay searches first to last
DEFAULT_CONFIG_NAME = "syncplay.ini"
RECENT_CLIENT_THRESHOLD = "1.7.1" # This and higher considered 'recent' clients (no warnings)
RECENT_CLIENT_THRESHOLD = "1.7.3" # This and higher considered 'recent' clients (no warnings)
MUSIC_FORMATS = [".mp3", ".m4a", ".m4p", ".wav", ".aiff", ".r", ".ogg", ".flac"] # ALL LOWER CASE!
WARN_OLD_CLIENTS = True # Use MOTD to inform old clients to upgrade
LIST_RELATIVE_CONFIGS = True # Print list of relative configs loaded
Expand Down Expand Up @@ -112,9 +112,9 @@ def getValueForOS(constantDict):
# Usually there's no need to adjust these
DOUBLE_CHECK_REWIND = False
LAST_PAUSED_DIFF_THRESHOLD = 2
FILENAME_STRIP_REGEX = "[-~_\.\[\](): ]"
CONTROL_PASSWORD_STRIP_REGEX = "[^a-zA-Z0-9\-]"
ROOM_NAME_STRIP_REGEX = "^(\+)(?P<roomnamebase>.*)(:)(\w{12})$"
FILENAME_STRIP_REGEX = r"[-~_\.\[\](): ]"
CONTROL_PASSWORD_STRIP_REGEX = r"[^a-zA-Z0-9\-]"
ROOM_NAME_STRIP_REGEX = r"^(\+)(?P<roomnamebase>.*)(:)(\w{12})$"
ARGUMENT_SPLIT_REGEX = r'(?:[^\s"]+|"[^"]*")+'
COMMANDS_UNDO = ["u", "undo", "revert"]
COMMANDS_CHAT = ["ch", "chat"]
Expand Down Expand Up @@ -166,7 +166,7 @@ def getValueForOS(constantDict):
]

MPC_EXECUTABLES = ["mpc-hc.exe", "mpc-hc64.exe", "mpc-hcportable.exe", "mpc-hc_nvo.exe", "mpc-hc64_nvo.exe", "shoukaku.exe"]
MPC64_EXECUTABLES = ["mpc-hc64.exe", "mpc-hc64_nvo.exe", "x64\mpc-hc\shoukaku.exe"]
MPC64_EXECUTABLES = ["mpc-hc64.exe", "mpc-hc64_nvo.exe", r"x64\mpc-hc\shoukaku.exe"]

MPC_BE_PATHS = [
r"c:\program files\mpc-be x64\mpc-be64.exe",
Expand All @@ -183,6 +183,7 @@ def getValueForOS(constantDict):
import os
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'))
MPV_PATHS.append(os.path.expandvars(r'%LOCALAPPDATA%\Microsoft\WindowsApps\mpv.exe'))
except:
pass
VLC_PATHS = [
Expand Down Expand Up @@ -305,7 +306,7 @@ def getValueForOS(constantDict):
OS_MACOS: ['--verbose=2', '--no-file-logging']})
MPV_SUPERSEDE_IF_DUPLICATE_COMMANDS = ["set_property time-pos ", "loadfile "]
MPV_REMOVE_BOTH_IF_DUPLICATE_COMMANDS = ["cycle pause"]
MPLAYER_ANSWER_REGEX = "^ANS_([a-zA-Z_-]+)=(.+)$|^(Exiting)\.\.\. \((.+)\)$"
MPLAYER_ANSWER_REGEX = r"^ANS_([a-zA-Z_-]+)=(.+)$|^(Exiting)\.\.\. \((.+)\)$"
VLC_ANSWER_REGEX = r"(?:^(?P<command>[a-zA-Z_-]+)(?:\: )?(?P<argument>.*))"
UI_COMMAND_REGEX = r"^(?P<command>[^\ ]+)(?:\ (?P<parameter>.+))?"
UI_OFFSET_REGEX = r"^(?:o|offset)\ ?(?P<sign>[/+-])?(?P<time>\d{1,9}(?:[^\d\.](?:\d{1,9})){0,2}(?:\.(?:\d{1,3}))?)$"
Expand Down
2 changes: 1 addition & 1 deletion syncplay/messages_de.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"hostname-empty-error": "Hostname darf nicht leer sein",
"empty-error": "{} darf nicht leer sein", # Configuration
"media-player-error": "Player-Fehler: \"{}\"", # Error line
"unable-import-gui-error": "Konnte die GUI-Bibliotheken nicht importieren. PySide muss installiert sein, damit die grafische Oberfläche funktioniert.",
"unable-import-gui-error": "Konnte die GUI-Bibliotheken nicht importieren. PySide muss installiert sein, damit die grafische Oberfläche funktioniert. If you want to run Syncplay in console mode then run it with the --no-gui command line switch. See https://syncplay.pl/guide/ for more details.", # TODO: Translate end of message and update second sentence to be a translation of "You need to have the correct version of PySide installed for the GUI to work."
"unable-import-twisted-error": "Twisted konnte nicht importiert werden. Bitte installiere Twisted v16.4.0 oder höher",

"arguments-missing-error": "Notwendige Argumente fehlen, siehe --help",
Expand Down
2 changes: 1 addition & 1 deletion syncplay/messages_en.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"hostname-empty-error": "Hostname can't be empty",
"empty-error": "{} can't be empty", # Configuration
"media-player-error": "Media player error: \"{}\"", # Error line
"unable-import-gui-error": "Could not import GUI libraries. If you do not have PySide installed then you will need to install it for the GUI to work.",
"unable-import-gui-error": "Could not import GUI libraries. You need to have the correct version of PySide installed for the GUI to work. If you want to run Syncplay in console mode then run it with the --no-gui command line switch. See https://syncplay.pl/guide/ for more details.",
"unable-import-twisted-error": "Could not import Twisted. Please install Twisted v16.4.0 or later.",

"arguments-missing-error": "Some necessary arguments are missing, refer to --help",
Expand Down
2 changes: 1 addition & 1 deletion syncplay/messages_eo.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
"hostname-empty-error": "Nomo de gastiga komputilo ne povas esti malplena",
"empty-error": "{} ne povas esti malplena", # Configuration
"media-player-error": "Eraro de vidaŭdaĵa ludilo: \"{}\"", # Error line
"unable-import-gui-error": "Ne povis enporti fasadajn bibliotekojn. Se PySide ne estas instalita, vi devos instali ĝin, por ke la fasado funkciu.",
"unable-import-gui-error": "Ne povis enporti fasadajn bibliotekojn. Se PySide ne estas instalita, vi devos instali ĝin, por ke la fasado funkciu. If you want to run Syncplay in console mode then run it with the --no-gui command line switch. See https://syncplay.pl/guide/ for more details.", # TODO: Translate end of message and update second sentence to be a translation of "You need to have the correct version of PySide installed for the GUI to work."
"unable-import-twisted-error": "Ne povis enporti la bibliotekon Twisted. Bonvolu instali version 16.4.0 de Twisted, aŭ pli altan.",

"arguments-missing-error": "Iuj bezonataj parametroj mankas; vidu al --help",
Expand Down
2 changes: 1 addition & 1 deletion syncplay/messages_es.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"hostname-empty-error": "El nombre del host no puede ser vacío",
"empty-error": "{} no puede ser vacío", # Configuration
"media-player-error": "Error del reproductor multimedia: \"{}\"", # Error line
"unable-import-gui-error": "No se lograron importar las librerías GUI. Si no tienes instalado PySide, entonces tendrás que instalarlo para que funcione el GUI.",
"unable-import-gui-error": "No se lograron importar las librerías GUI. Si no tienes instalado PySide, entonces tendrás que instalarlo para que funcione el GUI. If you want to run Syncplay in console mode then run it with the --no-gui command line switch. See https://syncplay.pl/guide/ for more details.", # TODO: Translate end of message and update second sentence to be a translation of "You need to have the correct version of PySide installed for the GUI to work."
"unable-import-twisted-error": "No se logró importar Twisted. Por favor instala Twisted v16.4.0 o posterior.",

"arguments-missing-error": "Están faltando algunos argumentos necesarios. Por favor revisa --help",
Expand Down
2 changes: 1 addition & 1 deletion syncplay/messages_fi.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"hostname-empty-error": "Palvelinnimi ei voi olla tyhjä",
"empty-error": "{} ei voi jättää tyhjäksi", # Configuration
"media-player-error": "Mediasoitin kohtasi virheen: \"{}\"", # Error line
"unable-import-gui-error": "Käyttöliittymäkirjastoja ei saatu tuotua. Mikäli sinulla ei ole PySide asennettuna, tulee sinun asentaa se jotta käyttöliittymä toimisi.",
"unable-import-gui-error": "Käyttöliittymäkirjastoja ei saatu tuotua. Mikäli sinulla ei ole PySide asennettuna, tulee sinun asentaa se jotta käyttöliittymä toimisi. If you want to run Syncplay in console mode then run it with the --no-gui command line switch. See https://syncplay.pl/guide/ for more details.", # TODO: Translate end of message and update second sentence to be a translation of "You need to have the correct version of PySide installed for the GUI to work."
"unable-import-twisted-error": "Twisted:iä ei onnistuttu tuomaan. Asenna Twisted v16.4.0 tai myöhäisempi.",

"arguments-missing-error": "Joitakin vipuja uupuu, katso apua --help",
Expand Down
2 changes: 1 addition & 1 deletion syncplay/messages_fr.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"hostname-empty-error": "Le nom d'hôte ne peut pas être vide",
"empty-error": "{} ne peut pas être vide", # Configuration
"media-player-error": "Media player error: \"{}\"", # Error line
"unable-import-gui-error": "Impossible d'importer les bibliothèques GUI. Si vous n'avez pas installé PySide, vous devrez l'installer pour que l'interface graphique fonctionne.",
"unable-import-gui-error": "Impossible d'importer les bibliothèques GUI. Si vous n'avez pas installé PySide, vous devrez l'installer pour que l'interface graphique fonctionne. If you want to run Syncplay in console mode then run it with the --no-gui command line switch. See https://syncplay.pl/guide/ for more details.", # TODO: Translate end of message and update second sentence to be a translation of "You need to have the correct version of PySide installed for the GUI to work."
"unable-import-twisted-error": "Impossible d'importer Twisted. Veuillez installer Twisted v16.4.0 ou une version ultérieure.",

"arguments-missing-error": "Certains arguments nécessaires sont manquants, reportez-vous à --help",
Expand Down
2 changes: 1 addition & 1 deletion syncplay/messages_it.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"hostname-empty-error": "Il campo hostname non può essere vuoto",
"empty-error": "Il campo {} non può esssere vuoto", # Configuration
"media-player-error": "Errore media player: \"{}\"", # Error line
"unable-import-gui-error": "Non è possibile importare le librerie di interfaccia grafica. Hai bisogno di PySide per poter utilizzare l'interfaccia grafica.",
"unable-import-gui-error": "Non è possibile importare le librerie di interfaccia grafica. Hai bisogno di PySide per poter utilizzare l'interfaccia grafica. If you want to run Syncplay in console mode then run it with the --no-gui command line switch. See https://syncplay.pl/guide/ for more details.", # TODO: Translate end of message and update second sentence to be a translation of "You need to have the correct version of PySide installed for the GUI to work."
"unable-import-twisted-error": "Non è possibile importare Twisted. Si prega di installare Twisted v16.4.0 o superiore.",

"arguments-missing-error": "Alcuni argomenti obbligatori non sono stati trovati. Fai riferimento a --help",
Expand Down
2 changes: 1 addition & 1 deletion syncplay/messages_ko.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"hostname-empty-error": "호스트이름은 비워둘 수 없습니다",
"empty-error": "{}은(는) 비워 둘 수 없습니다", # Configuration
"media-player-error": "미디어 플레이어 오류: \"{}\"", # Error line
"unable-import-gui-error": "GUI 라이브러리를 가져올 수 없습니다. PySide가 설치되어 있지 않은 경우 GUI가 작동하려면 설치해야 합니다.",
"unable-import-gui-error": "GUI 라이브러리를 가져올 수 없습니다. PySide가 설치되어 있지 않은 경우 GUI가 작동하려면 설치해야 합니다. If you want to run Syncplay in console mode then run it with the --no-gui command line switch. See https://syncplay.pl/guide/ for more details.", # TODO: Translate end of message and update second sentence to be a translation of "You need to have the correct version of PySide installed for the GUI to work."
"unable-import-twisted-error": "Twisted를 가져올 수 없습니다. Twisted v16.4.0 이상을 설치하세요.",

"arguments-missing-error": "일부 필요한 인수가 누락되었습니다. --help를 참조하세요.",
Expand Down
2 changes: 1 addition & 1 deletion syncplay/messages_pt_BR.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"hostname-empty-error": "O endereço do servidor não pode estar vazio",
"empty-error": "{} não pode estar vazio", # Configuration
"media-player-error": "Erro do reprodutor de mídia: \"{}\"", # Error line
"unable-import-gui-error": "Não foi possível importar bibliotecas da GUI. Se você não possuir o PySide instalado, instale-o para que a GUI funcione.",
"unable-import-gui-error": "Não foi possível importar bibliotecas da GUI. Se você não possuir o PySide instalado, instale-o para que a GUI funcione. If you want to run Syncplay in console mode then run it with the --no-gui command line switch. See https://syncplay.pl/guide/ for more details.", # TODO: Translate end of message and update second sentence to be a translation of "You need to have the correct version of PySide installed for the GUI to work."
"unable-import-twisted-error": "Não foi possível importar o Twisted. Por favor, instale o Twisted v16.4.0 ou superior.",

"arguments-missing-error": "Alguns argumentos necessários estão faltando, por favor reveja --help",
Expand Down
2 changes: 1 addition & 1 deletion syncplay/messages_pt_PT.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"hostname-empty-error": "O endereço do servidor não pode ser vazio",
"empty-error": "{} não pode ser vazio", # Configuration
"media-player-error": "Erro do reprodutor de mídia: \"{}\"", # Error line
"unable-import-gui-error": "Não foi possível importar bibliotecas da GUI. Se você não possuir o PySide instalado, instale-o para que a GUI funcione.",
"unable-import-gui-error": "Não foi possível importar bibliotecas da GUI. Se você não possuir o PySide instalado, instale-o para que a GUI funcione. If you want to run Syncplay in console mode then run it with the --no-gui command line switch. See https://syncplay.pl/guide/ for more details.", # TODO: Translate end of message and update second sentence to be a translation of "You need to have the correct version of PySide installed for the GUI to work."
"unable-import-twisted-error": "Não foi possível importar o Twisted. Por favor, instale o Twisted v16.4.0 ou superior.",

"arguments-missing-error": "Alguns argumentos necessários estão faltando, por favor reveja --help",
Expand Down
2 changes: 1 addition & 1 deletion syncplay/messages_ru.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"hostname-empty-error": "Имя пользователя не может быть пустым.",
"empty-error": "{} не может быть пустым.", # Configuration
"media-player-error": "Ошибка проигрывателя: \"{}\"", # Error line
"unable-import-gui-error": "Невозможно импортировать библиотеки графического интерфейса. Необходимо установить PySide, иначе графический интерфейс не будет работать.",
"unable-import-gui-error": "Невозможно импортировать библиотеки графического интерфейса. Необходимо установить PySide, иначе графический интерфейс не будет работать. If you want to run Syncplay in console mode then run it with the --no-gui command line switch. See https://syncplay.pl/guide/ for more details.", # TODO: Translate end of message and update second sentence to be a translation of "You need to have the correct version of PySide installed for the GUI to work."
"unable-import-twisted-error": "Невозможно импортировать Twisted. Установите Twisted 16.4.0 или более позднюю версию.",

"arguments-missing-error": "Некоторые необходимые аргументы отсутствуют, обратитесь к --help",
Expand Down
Loading

0 comments on commit bd9d233

Please sign in to comment.