Skip to content

Commit

Permalink
Merge branch 'master' into mpv-store-path
Browse files Browse the repository at this point in the history
  • Loading branch information
Et0h authored Apr 29, 2024
2 parents 9b0b502 + 64ea98a commit 6d3b1ab
Show file tree
Hide file tree
Showing 26 changed files with 111 additions and 64 deletions.
8 changes: 0 additions & 8 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ client:
cp syncplay/resources/syncplay.desktop $(APP_SHORTCUT_PATH)/
gzip docs/syncplay.1 --stdout > $(SHARE_PATH)/man/man1/syncplay.1.gz

ifeq ($(SINGLE_USER),false)
chmod 755 $(APP_SHORTCUT_PATH)/syncplay.desktop
endif

u-client:
-rm $(BIN_PATH)/syncplay
-rm $(LIB_PATH)/syncplay/syncplayClient.py
Expand All @@ -84,10 +80,6 @@ server:
cp syncplay/resources/syncplay-server.desktop $(APP_SHORTCUT_PATH)/
gzip docs/syncplay-server.1 --stdout > $(SHARE_PATH)/man/man1/syncplay-server.1.gz

ifeq ($(SINGLE_USER),false)
chmod 755 $(APP_SHORTCUT_PATH)/syncplay-server.desktop
endif

u-server:
-rm $(BIN_PATH)/syncplay-server
-rm $(LIB_PATH)/syncplay/syncplayServer.py
Expand Down
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-pyside2.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.1'
version = '1.7.2'
revision = ''
milestone = 'Yoitsu'
release_number = '109'
release_number = '111'
projectURL = 'https://syncplay.pl/'
3 changes: 3 additions & 0 deletions syncplay/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1785,6 +1785,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
14 changes: 8 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.2" # 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,10 @@ 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"]
COMMANDS_LIST = ["l", "list", "users"]
Expand Down Expand Up @@ -162,7 +163,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 @@ -178,6 +179,7 @@ def getValueForOS(constantDict):
try:
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
Expand Down Expand Up @@ -301,7 +303,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
28 changes: 14 additions & 14 deletions syncplay/messages_de.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@
"commandlist-notification/create": "\tc [name] - erstelle zentral gesteuerten Raum mit dem aktuellen Raumnamen",
"commandlist-notification/auth": "\ta [password] - authentifiziere als Raumleiter mit Passwort",
"commandlist-notification/chat": "\tch [message] - Chatnachricht an einem Raum senden",
"commandList-notification/queue": "\tqa [file/url] - add file or url to bottom of playlist", # TO DO: Translate
"commandList-notification/queueandselect": "\tqas [file/url] - add file or url to bottom of playlist and select it", # TO DO: Translate
"commandList-notification/playlist": "\tql - show the current playlist", # TO DO: Translate
"commandList-notification/select": "\tqs [index] - select given entry in the playlist", # TO DO: Translate
"commandList-notification/next": "\tqn - select next entry in the playlist", # TODO: Translate
"commandList-notification/delete": "\tqd [index] - delete the given entry from the playlist", # TO DO: Translate
"commandList-notification/queue": "\tqa [file/url] - füge Datei oder URL ans Ende der Wiedergabeliste",
"commandList-notification/queueandselect": "\tqas [file/url] - füge Datei oder URL ans Ende der Wiedergabeliste und wähle diese aus",
"commandList-notification/playlist": "\tql - zeige aktuelle Wiedergabeliste",
"commandList-notification/select": "\tqs [index] - wähle den ausgewählten Eintrag in der Wiedergabeliste",
"commandList-notification/next": "\tqn - wähle den nächsten Eintrag in der Wiedergabeliste",
"commandList-notification/delete": "\tqd [index] - lösche den ausgewählten Eintrag in der Wiedergabeliste",
"syncplay-version-notification": "Syncplay Version: {}", # syncplay.version
"more-info-notification": "Weitere Informationen auf: {}", # projectURL

Expand All @@ -127,13 +127,13 @@
"mpc-version-insufficient-error": "MPC-Version nicht ausreichend, bitte nutze `mpc-hc` >= `{}`",
"mpc-be-version-insufficient-error": "MPC-Version nicht ausreichend, bitte nutze `mpc-be` >= `{}`",
"mpv-version-error": "Syncplay ist nicht kompatibel mit dieser Version von mpv. Bitte benutze eine andere Version (z.B. 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.", # TODO: Translate
"mpv-failed-advice": "Der Grund dass mpv nicht gestartet werden kann, kann an der Verwendung nicht unterstützter Befehlszeilenargumente oder einer nicht unterstützten Version von mpv liegen.",
"player-file-open-error": "Fehler beim Öffnen der Datei durch den Player",
"player-path-error": "Ungültiger Player-Pfad. Unterstützte Player sind: mpv, mpv.net, VLC, MPC-HC, MPC-BE, mplayer2 und IINA",
"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 Expand Up @@ -205,7 +205,7 @@
"name-label": "Benutzername (optional):",
"password-label": "Server-Passwort (falls nötig):",
"room-label": "Standard-Raum:",
"roomlist-msgbox-label": "Edit room list (one per line)", # TODO: Translate
"roomlist-msgbox-label": "Bearbeite Raum Liste (eins pro Linie)",

"media-setting-title": "Media-Player Einstellungen",
"executable-path-label": "Pfad zum Media-Player:",
Expand Down Expand Up @@ -348,8 +348,8 @@
"startTLS-initiated": "Sichere Verbindung wird versucht",
"startTLS-secure-connection-ok": "Sichere Verbindung hergestellt ({})",
"startTLS-server-certificate-invalid": 'Sichere Verbindung fehlgeschlagen. Der Server benutzt ein ungültiges Sicherheitszertifikat. Der Kanal könnte von Dritten abgehört werden. Für weitere Details und Problemlösung siehe <a href="https://syncplay.pl/trouble">hier</a> [Englisch].',
"startTLS-server-certificate-invalid-DNS-ID": "Syncplay does not trust this server because it uses a certificate that is not valid for its hostname.", # TODO: Translate
"startTLS-not-supported-client": "Dieser Server unterstützt kein TLS",
"startTLS-server-certificate-invalid-DNS-ID": "Syncplay vertraut diesem Server nicht, da er ein Zertifikat verwendet, das für seinen Hostnamen ungültig ist.",
"startTLS-not-supported-client": "Dieser Client unterstützt kein TLS",
"startTLS-not-supported-server": "Dieser Server unterstützt kein TLS",

# TLS certificate dialog
Expand Down Expand Up @@ -396,7 +396,7 @@
"password-tooltip": "Passwörter sind nur bei Verbindung zu privaten Servern nötig.",
"room-tooltip": "Der Raum, der betreten werden soll, kann ein x-beliebiger sein. Allerdings werden nur Clients im selben Raum synchronisiert.",

"edit-rooms-tooltip": "Edit room list.", # TO DO: Translate
"edit-rooms-tooltip": "Bearbeite Raum Liste.",

"executable-path-tooltip": "Pfad zum ausgewählten, unterstützten Mediaplayer (mpv, mpv.net, VLC, MPC-HC/BE, mplayer2, oder IINA).",
"media-path-tooltip": "Pfad zum wiederzugebenden Video oder Stream. Notwendig für mplayer2.",
Expand Down Expand Up @@ -540,6 +540,6 @@
"playlist-instruction-item-message": "Zieh eine Datei hierher, um sie zur geteilten Playlist hinzuzufügen.",
"sharedplaylistenabled-tooltip": "Raumleiter können Dateien zu einer geteilten Playlist hinzufügen und es so erleichtern, gemeinsam das Gleiche zu gucken. Konfiguriere Medienverzeichnisse unter „Diverse“",

"playlist-empty-error": "Playlist is currently empty.", # TO DO: Translate
"playlist-invalid-index-error": "Invalid playlist index", # TO DO: Translate
"playlist-empty-error": "Wiedergabeliste is aktuell leer.",
"playlist-invalid-index-error": "Ungültiger Wiedergabelisten-Index",
}
2 changes: 1 addition & 1 deletion syncplay/messages_en.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,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 @@ -136,7 +136,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 @@ -133,7 +133,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 @@ -133,7 +133,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 @@ -133,7 +133,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 @@ -133,7 +133,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 @@ -133,7 +133,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 @@ -134,7 +134,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
Loading

0 comments on commit 6d3b1ab

Please sign in to comment.