From f8ea2381a6e1dbc2cfca63290e5e1ac0cf9177db Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Sun, 24 Feb 2019 16:18:47 +0100 Subject: [PATCH 001/105] sendHello only after a successful startTLS handshake, if one is attempted --- syncplay/client.py | 2 +- syncplay/messages_de.py | 2 +- syncplay/messages_en.py | 2 +- syncplay/messages_it.py | 2 +- syncplay/messages_ru.py | 2 +- syncplay/protocols.py | 6 ++++-- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/syncplay/client.py b/syncplay/client.py index c284e45..2ea0ca3 100755 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -757,7 +757,7 @@ class SyncplayClient(object): def connectedNow(f): hostIP = connectionHandle.result.transport.addr[0] - self.ui.showMessage(getMessage("handshake-successful-notification").format(host, hostIP)) + self.ui.showMessage(getMessage("reachout-successful-notification").format(host, hostIP)) return def failed(f): diff --git a/syncplay/messages_de.py b/syncplay/messages_de.py index 999bf35..c2ef7cf 100755 --- a/syncplay/messages_de.py +++ b/syncplay/messages_de.py @@ -16,7 +16,7 @@ de = { "connection-failed-notification": "Verbindung zum Server fehlgeschlagen", "connected-successful-notification": "Erfolgreich mit Server verbunden", "retrying-notification": "%s, versuche erneut in %d Sekunden...", # Seconds - "handshake-successful-notification": "Connection established with {} ({})", # TODO: Translate + "reachout-successful-notification": "Successfully reached {} ({})", # TODO: Translate "rewind-notification": "Zurückgespult wegen Zeitdifferenz mit {}", # User "fastforward-notification": "Vorgespult wegen Zeitdifferenz mit {}", # User diff --git a/syncplay/messages_en.py b/syncplay/messages_en.py index 9474452..c135fc1 100755 --- a/syncplay/messages_en.py +++ b/syncplay/messages_en.py @@ -16,7 +16,7 @@ en = { "connection-failed-notification": "Connection with server failed", "connected-successful-notification": "Successfully connected to server", "retrying-notification": "%s, Retrying in %d seconds...", # Seconds - "handshake-successful-notification": "Connection established with {} ({})", + "reachout-successful-notification": "Successfully reached {} ({})", "rewind-notification": "Rewinded due to time difference with {}", # User "fastforward-notification": "Fast-forwarded due to time difference with {}", # User diff --git a/syncplay/messages_it.py b/syncplay/messages_it.py index 2153a38..c6098f2 100755 --- a/syncplay/messages_it.py +++ b/syncplay/messages_it.py @@ -16,7 +16,7 @@ it = { "connection-failed-notification": "Connessione col server fallita", "connected-successful-notification": "Connessione al server effettuata con successo", "retrying-notification": "%s, Nuovo tentativo in %d secondi...", # Seconds - "handshake-successful-notification": "Connessione stabilita con {} ({})", + "reachout-successful-notification": "Collegamento stabilito con {} ({})", "rewind-notification": "Riavvolgo a causa della differenza temporale con {}", # User "fastforward-notification": "Avanzamento rapido a causa della differenza temporale con {}", # User diff --git a/syncplay/messages_ru.py b/syncplay/messages_ru.py index 7452db0..62d1517 100755 --- a/syncplay/messages_ru.py +++ b/syncplay/messages_ru.py @@ -16,7 +16,7 @@ ru = { "connection-failed-notification": "Не удалось подключиться к серверу", "connected-successful-notification": "Соединение с сервером установлено", "retrying-notification": "%s, следующая попытка через %d секунд(ы)...", # Seconds - "handshake-successful-notification": "Connection established with {} ({})", # TODO: Translate + "reachout-successful-notification": "Successfully reached {} ({})", # TODO: Translate "rewind-notification": "Перемотано из-за разницы во времени с {}", # User "fastforward-notification": "Ускорено из-за разницы во времени с {}", # User diff --git a/syncplay/protocols.py b/syncplay/protocols.py index 7607fad..7e8305e 100755 --- a/syncplay/protocols.py +++ b/syncplay/protocols.py @@ -1,6 +1,7 @@ # coding:utf8 import json import time +from datetime import datetime from functools import wraps from twisted.protocols.basic import LineReceiver @@ -336,10 +337,9 @@ class SyncClientProtocol(JSONCommandProtocol): self.transport.startTLS(self._client.protocolFactory.options) elif "false" in answer: self._client.ui.showErrorMessage(getMessage("startTLS-not-supported-server")) - self.sendHello() + self.sendHello() def handshakeCompleted(self): - from datetime import datetime self._serverCertificateTLS = self.transport.getPeerCertificate() self._subjectTLS = self._serverCertificateTLS.get_subject().CN self._issuerTLS = self._serverCertificateTLS.get_issuer().CN @@ -362,6 +362,8 @@ class SyncClientProtocol(JSONCommandProtocol): 'protocolString': self._connVersionStringTLS, 'protocolVersion': self._connVersionNumberTLS, 'cipher': self._cipherNameTLS}) + self.sendHello() + class SyncServerProtocol(JSONCommandProtocol): def __init__(self, factory): From d3a363573648b9bd16780841ad8978b175235e85 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Tue, 26 Feb 2019 08:35:11 +0100 Subject: [PATCH 002/105] Ensure client support for Twisted >=16.4.0 --- syncplay/client.py | 7 +++++-- syncplay/protocols.py | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/syncplay/client.py b/syncplay/client.py index 2ea0ca3..8a42bc8 100755 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -12,10 +12,10 @@ import time from copy import deepcopy from functools import wraps +from twisted.application.internet import ClientService from twisted.internet.endpoints import HostnameEndpoint from twisted.internet.protocol import ClientFactory from twisted.internet import reactor, task, defer, threads -from twisted.application.internet import ClientService try: import certifi @@ -752,7 +752,10 @@ class SyncplayClient(object): return(0.1 * (2 ** min(retries, 5))) self._reconnectingService = ClientService(self._endpoint, self.protocolFactory, retryPolicy=retry) - waitForConnection = self._reconnectingService.whenConnected(failAfterFailures=1) + try: + waitForConnection = self._reconnectingService.whenConnected(failAfterFailures=1) + except TypeError: + waitForConnection = self._reconnectingService.whenConnected() self._reconnectingService.startService() def connectedNow(f): diff --git a/syncplay/protocols.py b/syncplay/protocols.py index 7e8305e..3bf0902 100755 --- a/syncplay/protocols.py +++ b/syncplay/protocols.py @@ -4,8 +4,10 @@ import time from datetime import datetime from functools import wraps -from twisted.protocols.basic import LineReceiver +from twisted import version as twistedVersion from twisted.internet.interfaces import IHandshakeListener +from twisted.protocols.basic import LineReceiver +from twisted.python.versions import Version from zope.interface.declarations import implementer import syncplay @@ -335,10 +337,23 @@ class SyncClientProtocol(JSONCommandProtocol): answer = message["startTLS"] if "startTLS" in message else None if "true" in answer and not self.logged and self._client.protocolFactory.options is not None: self.transport.startTLS(self._client.protocolFactory.options) + # To be deleted when the support for Twisted between >=16.4.0 and < 17.1.0 is dropped + minTwistedVersion = Version('twisted', 17, 1, 0) + if twistedVersion < minTwistedVersion: + self._client.protocolFactory.options._ctx.set_info_callback(self.customHandshakeCallback) elif "false" in answer: self._client.ui.showErrorMessage(getMessage("startTLS-not-supported-server")) self.sendHello() + def customHandshakeCallback(self, conn, where, ret): + # To be deleted when the support for Twisted between >=16.4.0 and < 17.1.0 is dropped + from OpenSSL.SSL import SSL_CB_HANDSHAKE_START, SSL_CB_HANDSHAKE_DONE + if where == SSL_CB_HANDSHAKE_START: + self._client.ui.showDebugMessage("TLS handshake started") + if where == SSL_CB_HANDSHAKE_DONE: + self._client.ui.showDebugMessage("TLS handshake done") + self.handshakeCompleted() + def handshakeCompleted(self): self._serverCertificateTLS = self.transport.getPeerCertificate() self._subjectTLS = self._serverCertificateTLS.get_subject().CN From d18a56eb7116d3f89c195ce8a014fe015c7a91fc Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Sat, 16 Feb 2019 18:49:02 +0100 Subject: [PATCH 003/105] Add requirements.txt to install dependencies with pip --- requirements.txt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a5646ec --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +certifi>=2018.11.29 +pyside2>=5.12.0 +twisted[tls]>=18.4.0 +appnope>=0.1.0; sys_platform == 'darwin' +requests>=2.20.0; sys_platform == 'darwin' +pypiwin32>=223; sys_platform == 'win32' +zope.inteface>=4.4.0; sys_platform == 'win32' From e52e9410e2563e4be8bba19347cf5ddb19933345 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Wed, 20 Feb 2019 14:56:25 +0100 Subject: [PATCH 004/105] requirements: separate files for GUI and TLS support --- requirements.txt | 5 +---- requirements_gui.txt | 2 ++ requirements_tls.txt | 2 ++ 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 requirements_gui.txt create mode 100644 requirements_tls.txt diff --git a/requirements.txt b/requirements.txt index a5646ec..72d87e1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,4 @@ -certifi>=2018.11.29 -pyside2>=5.12.0 -twisted[tls]>=18.4.0 +twisted>=18.4.0 appnope>=0.1.0; sys_platform == 'darwin' -requests>=2.20.0; sys_platform == 'darwin' pypiwin32>=223; sys_platform == 'win32' zope.inteface>=4.4.0; sys_platform == 'win32' diff --git a/requirements_gui.txt b/requirements_gui.txt new file mode 100644 index 0000000..5eaed0f --- /dev/null +++ b/requirements_gui.txt @@ -0,0 +1,2 @@ +pyside2>=5.12.0 +requests>=2.20.0; sys_platform == 'darwin' diff --git a/requirements_tls.txt b/requirements_tls.txt new file mode 100644 index 0000000..731435e --- /dev/null +++ b/requirements_tls.txt @@ -0,0 +1,2 @@ +certifi>=2018.11.29 +twisted[tls]>=18.4.0 \ No newline at end of file From 04f8bf8ed37e0a4e0cebd85cefc312bcd87bc8ae Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Sat, 23 Feb 2019 00:20:20 +0100 Subject: [PATCH 005/105] requirements: amend Twisted minimum version --- requirements.txt | 4 ++-- requirements_tls.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 72d87e1..949df73 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -twisted>=18.4.0 +twisted>=16.4.0 appnope>=0.1.0; sys_platform == 'darwin' pypiwin32>=223; sys_platform == 'win32' -zope.inteface>=4.4.0; sys_platform == 'win32' +zope.inteface>=4.4.0; sys_platform == 'win32' \ No newline at end of file diff --git a/requirements_tls.txt b/requirements_tls.txt index 731435e..5a7646a 100644 --- a/requirements_tls.txt +++ b/requirements_tls.txt @@ -1,2 +1,2 @@ certifi>=2018.11.29 -twisted[tls]>=18.4.0 \ No newline at end of file +twisted[tls]>=16.4.0 \ No newline at end of file From aaf332b74cd71b4dca3eb21c311296d8325aca78 Mon Sep 17 00:00:00 2001 From: Etoh Date: Tue, 26 Feb 2019 22:21:01 +0000 Subject: [PATCH 006/105] Refactor: Avoid complicate your/their file/stream concatenation --- syncplay/messages.py | 4 ++-- syncplay/messages_de.py | 12 ++++++------ syncplay/messages_en.py | 12 ++++++------ syncplay/messages_it.py | 12 ++++++------ syncplay/messages_ru.py | 8 ++++---- syncplay/ui/gui.py | 20 +++++++++++++------- 6 files changed, 37 insertions(+), 31 deletions(-) diff --git a/syncplay/messages.py b/syncplay/messages.py index 4142cbb..f2c4657 100755 --- a/syncplay/messages.py +++ b/syncplay/messages.py @@ -75,5 +75,5 @@ def getMessage(type_, locale=None): return str(messages["en"][type_]) else: print("WARNING: Cannot find message '{}'!".format(type_)) - return "!{}".format(type_) # TODO: Remove - # raise KeyError(type_) + #return "!{}".format(type_) # TODO: Remove + raise KeyError(type_) diff --git a/syncplay/messages_de.py b/syncplay/messages_de.py index c2ef7cf..a5b762f 100755 --- a/syncplay/messages_de.py +++ b/syncplay/messages_de.py @@ -484,12 +484,12 @@ de = { "editplaylist-menu-label": "Edit playlist", "open-containing-folder": "Open folder containing this file", - "addusersfiletoplaylist-menu-label": "Add {} file to playlist", # item owner indicator - "addusersstreamstoplaylist-menu-label": "Add {} stream to playlist", # item owner indicator - "openusersstream-menu-label": "Open {} stream", # [username]'s - "openusersfile-menu-label": "Open {} file", # [username]'s - "item-is-yours-indicator": "your", # Goes with addusersfiletoplaylist/addusersstreamstoplaylist - "item-is-others-indicator": "{}'s", # username - goes with addusersfiletoplaylist/addusersstreamstoplaylist + "addyourfiletoplaylist-menu-label": "Add your file to playlist", + "addotherusersfiletoplaylist-menu-label": "Add {}'s file to playlist", # [Username] + "addyourstreamstoplaylist-menu-label": "Add your stream to playlist", + "addotherusersstreamstoplaylist-menu-label": "Add {}' stream to playlist", # [Username] + "openusersstream-menu-label": "Open {}'s stream", # [username]'s + "openusersfile-menu-label": "Open {}'s file", # [username]'s "playlist-instruction-item-message": "Drag file here to add it to the shared playlist.", "sharedplaylistenabled-tooltip": "Room operators can add files to a synced playlist to make it easy for everyone to watching the same thing. Configure media directories under 'Misc'.", diff --git a/syncplay/messages_en.py b/syncplay/messages_en.py index c135fc1..1fd0d04 100755 --- a/syncplay/messages_en.py +++ b/syncplay/messages_en.py @@ -484,12 +484,12 @@ en = { "editplaylist-menu-label": "Edit playlist", "open-containing-folder": "Open folder containing this file", - "addusersfiletoplaylist-menu-label": "Add {} file to playlist", # item owner indicator - "addusersstreamstoplaylist-menu-label": "Add {} stream to playlist", # item owner indicator - "openusersstream-menu-label": "Open {} stream", # [username]'s - "openusersfile-menu-label": "Open {} file", # [username]'s - "item-is-yours-indicator": "your", # Goes with addusersfiletoplaylist/addusersstreamstoplaylist - "item-is-others-indicator": "{}'s", # username - goes with addusersfiletoplaylist/addusersstreamstoplaylist + "addyourfiletoplaylist-menu-label": "Add your file to playlist", + "addotherusersfiletoplaylist-menu-label": "Add {}'s file to playlist", # [Username] + "addyourstreamstoplaylist-menu-label": "Add your stream to playlist", + "addotherusersstreamstoplaylist-menu-label": "Add {}' stream to playlist", # [Username] + "openusersstream-menu-label": "Open {}'s stream", # [username]'s + "openusersfile-menu-label": "Open {}'s file", # [username]'s "playlist-instruction-item-message": "Drag file here to add it to the shared playlist.", "sharedplaylistenabled-tooltip": "Room operators can add files to a synced playlist to make it easy for everyone to watching the same thing. Configure media directories under 'Misc'.", diff --git a/syncplay/messages_it.py b/syncplay/messages_it.py index c6098f2..b308c88 100755 --- a/syncplay/messages_it.py +++ b/syncplay/messages_it.py @@ -484,12 +484,12 @@ it = { "editplaylist-menu-label": "Modifica la playlist", "open-containing-folder": "Apri la cartella contenente questo file", - "addusersfiletoplaylist-menu-label": "Aggiungi il file {} alla playlist", # item owner indicator # TODO needs testing - "addusersstreamstoplaylist-menu-label": "Aggiungi l'indirizzo {} alla playlist", # item owner indicator # TODO needs testing - "openusersstream-menu-label": "Apri l'indirizzo di {}", # [username]'s - "openusersfile-menu-label": "Apri il file di {}", # [username]'s - "item-is-yours-indicator": "tuo", # Goes with addusersfiletoplaylist/addusersstreamstoplaylist # TODO needs testing - "item-is-others-indicator": "di {}", # username - goes with addusersfiletoplaylist/addusersstreamstoplaylist # TODO needs testing + "addyourfiletoplaylist-menu-label": "Aggiungi il file tuo alla playlist", # TODO needs testing + "addotherusersfiletoplaylist-menu-label": "Aggiungi il file di {} alla playlist", # Username # TODO needs testing + "addyourstreamstoplaylist-menu-label": "Aggiungi l'indirizzo tuo alla playlist", # TODO needs testing + "addotherusersstreamstoplaylist-menu-label": "Aggiungi l'indirizzo di {} alla playlist", # Username # item owner indicator # TODO needs testing + "openusersstream-menu-label": "Apri l'indirizzo di {}", # [username] # TODO needs testing + "openusersfile-menu-label": "Apri il file di {}", # [username]'s # TODO needs testing "playlist-instruction-item-message": "Trascina qui i file per aggiungerli alla playlist condivisa.", "sharedplaylistenabled-tooltip": "Gli operatori della stanza possono aggiungere i file a una playlist sincronizzata per garantire che tutti i partecipanti stiano guardando la stessa cosa. Configura le cartelle multimediali alla voce 'Miscellanea'.", diff --git a/syncplay/messages_ru.py b/syncplay/messages_ru.py index 62d1517..bd1abe7 100755 --- a/syncplay/messages_ru.py +++ b/syncplay/messages_ru.py @@ -484,12 +484,12 @@ ru = { "editplaylist-menu-label": "Редактировать список", "open-containing-folder": "Open folder containing this file", # TODO: Traslate - "addusersfiletoplaylist-menu-label": "Добавить файл {} в список воспроизведения", # item owner indicator - "addusersstreamstoplaylist-menu-label": "Добавить поток {} в список воспроизведения", # item owner indicator + "addyourfiletoplaylist-menu-label": "Добавить файл от вас в список воспроизведения", # TODO: Check + "addotherusersfiletoplaylist-menu-label": "Добавить файл {} в список воспроизведения", # Username # TODO: Check + "addyourstreamstoplaylist-menu-label": "Добавить поток от вас в список воспроизведения", # TODO: Check + "addotherusersstreamstoplaylist-menu-label": "Добавить поток {} в список воспроизведения", # Username # TODO: Check "openusersstream-menu-label": "Открыть поток от {}", # [username]'s "openusersfile-menu-label": "Открыть файл от {}", # [username]'s - "item-is-yours-indicator": "от вас", # Goes with addusersfiletoplaylist/addusersstreamstoplaylist - "item-is-others-indicator": "{}", # username - goes with addusersfiletoplaylist/addusersstreamstoplaylist "playlist-instruction-item-message": "Перетащите сюда файлы, чтобы добавить их в общий список.", "sharedplaylistenabled-tooltip": "Оператор комнаты может добавлять файлы в список общего воспроизведения для удобного совместного просмотра. Папки воспроизведения настраиваются во вкладке 'Файл'.", diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index a50ca16..7776bac 100755 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -699,12 +699,18 @@ class MainWindow(QtWidgets.QMainWindow): menu = QtWidgets.QMenu() username = item.sibling(item.row(), 0).data() - if username == self._syncplayClient.userlist.currentUser.username: - shortUsername = getMessage("item-is-yours-indicator") - elif len(username) < 15: - shortUsername = getMessage("item-is-others-indicator").format(username) + + if len(username) < 15: + shortUsername = username else: - shortUsername = "{}...".format(getMessage("item-is-others-indicator").format(username[0:12])) # TODO: Enforce username limits in client and server + shortUsername = "{}...".format(username[0:12]) + + if username == self._syncplayClient.userlist.currentUser.username: + addUsersFileToPlaylistLabelText = getMessage("addyourfiletoplaylist-menu-label") + addUsersStreamToPlaylistLabelText = getMessage("addyourstreamstoplaylist-menu-label") + else: + addUsersFileToPlaylistLabelText = getMessage("addotherusersfiletoplaylist-menu-label").format(shortUsername) + addUsersStreamToPlaylistLabelText = getMessage("addotherusersstreamstoplaylist-menu-label").format(shortUsername) filename = item.sibling(item.row(), 3).data() while item.parent().row() != -1: @@ -715,9 +721,9 @@ class MainWindow(QtWidgets.QMainWindow): elif username and filename and filename != getMessage("nofile-note"): if self.config['sharedPlaylistEnabled'] and not self.isItemInPlaylist(filename): if isURL(filename): - menu.addAction(QtGui.QPixmap(resourcespath + "world_add.png"), getMessage("addusersstreamstoplaylist-menu-label").format(shortUsername), lambda: self.addStreamToPlaylist(filename)) + menu.addAction(QtGui.QPixmap(resourcespath + "world_add.png"), addUsersStreamToPlaylistLabelText, lambda: self.addStreamToPlaylist(filename)) else: - menu.addAction(QtGui.QPixmap(resourcespath + "film_add.png"), getMessage("addusersfiletoplaylist-menu-label").format(shortUsername), lambda: self.addStreamToPlaylist(filename)) + menu.addAction(QtGui.QPixmap(resourcespath + "film_add.png"), addUsersFileToPlaylistLabelText, lambda: self.addStreamToPlaylist(filename)) if self._syncplayClient.userlist.currentUser.file is None or filename != self._syncplayClient.userlist.currentUser.file["name"]: if isURL(filename): From 276eed4b1d17d9c89e775f04b21439a893c85ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Catt=C3=A1neo?= Date: Wed, 27 Feb 2019 07:04:28 -0300 Subject: [PATCH 007/105] Add Spanish translation (#227) Add Spanish translation and small fix on others. * Added missing languages in 'language-argument' and new 'es' language * Small fix on 'unpause-ifothersready-tooltip' * Adds Spanish translation to Syncplay and its installer --- buildPy2exe.py | 17 ++ syncplay/messages.py | 2 + syncplay/messages_de.py | 2 +- syncplay/messages_en.py | 4 +- syncplay/messages_es.py | 496 ++++++++++++++++++++++++++++++++++++++++ syncplay/messages_it.py | 2 +- syncplay/messages_ru.py | 2 +- 7 files changed, 520 insertions(+), 5 deletions(-) create mode 100644 syncplay/messages_es.py diff --git a/buildPy2exe.py b/buildPy2exe.py index 0daf7d0..ff67342 100644 --- a/buildPy2exe.py +++ b/buildPy2exe.py @@ -61,6 +61,7 @@ NSIS_SCRIPT_TEMPLATE = r""" LoadLanguageFile "$${NSISDIR}\Contrib\Language files\Russian.nlf" LoadLanguageFile "$${NSISDIR}\Contrib\Language files\German.nlf" LoadLanguageFile "$${NSISDIR}\Contrib\Language files\Italian.nlf" + LoadLanguageFile "$${NSISDIR}\Contrib\Language files\Spanish.nlf" Unicode true @@ -93,6 +94,11 @@ NSIS_SCRIPT_TEMPLATE = r""" VIAddVersionKey /LANG=$${LANG_ITALIAN} "LegalCopyright" "Syncplay" VIAddVersionKey /LANG=$${LANG_ITALIAN} "FileDescription" "Syncplay" + VIAddVersionKey /LANG=$${LANG_SPANISH} "ProductName" "Syncplay" + VIAddVersionKey /LANG=$${LANG_SPANISH} "FileVersion" "$version.0" + VIAddVersionKey /LANG=$${LANG_SPANISH} "LegalCopyright" "Syncplay" + VIAddVersionKey /LANG=$${LANG_SPANISH} "FileDescription" "Syncplay" + LangString ^SyncplayLanguage $${LANG_ENGLISH} "en" LangString ^Associate $${LANG_ENGLISH} "Associate Syncplay with multimedia files." LangString ^Shortcut $${LANG_ENGLISH} "Create Shortcuts in following locations:" @@ -137,6 +143,15 @@ NSIS_SCRIPT_TEMPLATE = r""" LangString ^AutomaticUpdates $${LANG_ITALIAN} "Controllo automatico degli aggiornamenti" LangString ^UninstConfig $${LANG_ITALIAN} "Cancella i file di configurazione." + LangString ^SyncplayLanguage $${LANG_SPANISH} "es" + LangString ^Associate $${LANG_SPANISH} "Asociar Syncplay con archivos multimedia." + LangString ^Shortcut $${LANG_SPANISH} "Crear accesos directos en las siguientes ubicaciones:" + LangString ^StartMenu $${LANG_SPANISH} "Menú de inicio" + LangString ^Desktop $${LANG_SPANISH} "Escritorio" + LangString ^QuickLaunchBar $${LANG_SPANISH} "Barra de acceso rápido" + LangString ^AutomaticUpdates $${LANG_SPANISH} "Buscar actualizaciones automáticamente" + LangString ^UninstConfig $${LANG_SPANISH} "Borrar archivo de configuración." + ; Remove text to save space LangString ^ClickInstall $${LANG_GERMAN} " " @@ -240,6 +255,8 @@ NSIS_SCRIPT_TEMPLATE = r""" Push Deutsch Push $${LANG_ITALIAN} Push Italiano + Push $${LANG_SPANISH} + Push Español Push A ; A means auto count languages LangDLL::LangDialog "Language Selection" "Please select the language of Syncplay and the installer" Pop $$LANGUAGE diff --git a/syncplay/messages.py b/syncplay/messages.py index f2c4657..83d8105 100755 --- a/syncplay/messages.py +++ b/syncplay/messages.py @@ -5,12 +5,14 @@ from . import messages_en from . import messages_ru from . import messages_de from . import messages_it +from . import messages_es messages = { "en": messages_en.en, "ru": messages_ru.ru, "de": messages_de.de, "it": messages_it.it, + "es": messages_es.es, "CURRENT": None } diff --git a/syncplay/messages_de.py b/syncplay/messages_de.py index a5b762f..372f7f2 100755 --- a/syncplay/messages_de.py +++ b/syncplay/messages_de.py @@ -168,7 +168,7 @@ de = { "file-argument": 'Abzuspielende Datei', "args-argument": 'Player-Einstellungen; Wenn du Einstellungen, die mit - beginnen, nutzen willst, stelle ein einzelnes \'--\'-Argument davor', "clear-gui-data-argument": 'Setzt die Pfad- und GUI-Fenster-Daten die in den QSettings gespeichert sind zurück', - "language-argument": 'Sprache für Syncplay-Nachrichten (de/en/ru)', + "language-argument": 'Sprache für Syncplay-Nachrichten (de/en/ru/it/es)', "version-argument": 'gibt die aktuelle Version aus', "version-message": "Du verwendest Syncplay v. {} ({})", diff --git a/syncplay/messages_en.py b/syncplay/messages_en.py index 1fd0d04..e426a9d 100755 --- a/syncplay/messages_en.py +++ b/syncplay/messages_en.py @@ -168,7 +168,7 @@ en = { "file-argument": 'file to play', "args-argument": 'player options, if you need to pass options starting with - prepend them with single \'--\' argument', "clear-gui-data-argument": 'resets path and window state GUI data stored as QSettings', - "language-argument": 'language for Syncplay messages (de/en/ru)', + "language-argument": 'language for Syncplay messages (de/en/ru/it/es)', "version-argument": 'prints your version', "version-message": "You're using Syncplay version {} ({})", @@ -392,7 +392,7 @@ en = { "language-tooltip": "Language to be used by Syncplay.", "unpause-always-tooltip": "If you press unpause it always sets you as ready and unpause, rather than just setting you as ready.", "unpause-ifalreadyready-tooltip": "If you press unpause when not ready it will set you as ready - press unpause again to unpause.", - "unpause-ifothersready-tooltip": "If you press unpause when not ready, it will only upause if others are ready.", + "unpause-ifothersready-tooltip": "If you press unpause when not ready, it will only unpause if others are ready.", "unpause-ifminusersready-tooltip": "If you press unpause when not ready, it will only unpause if others are ready and minimum users threshold is met.", "trusteddomains-arguments-tooltip": "Domains that it is okay for Syncplay to automatically switch to when shared playlists is enabled.", diff --git a/syncplay/messages_es.py b/syncplay/messages_es.py new file mode 100644 index 0000000..c4d63b5 --- /dev/null +++ b/syncplay/messages_es.py @@ -0,0 +1,496 @@ +# coding:utf8 + +"""Spanish dictionary""" + +es = { + "LANGUAGE": "Español", + + # Client notifications + "config-cleared-notification": "Ajustes limpiados. Los cambios serán guardados cuando almacenes una configuración válida.", + + "relative-config-notification": "Cargados los archivo(s) de configuración relativa: {}", + + "connection-attempt-notification": "Intentando conectarse a {}:{}", # Port, IP + "reconnection-attempt-notification": "Se perdió la conexión con el servidor, intentando reconectar", + "disconnection-notification": "Desconectado del servidor", + "connection-failed-notification": "La conexión con el servidor falló", + "connected-successful-notification": "Conectado al servidor exitosamente", + "retrying-notification": "%s, Reintentando en %d segundos...", # Seconds + "reachout-successful-notification": "Se alcanzó {} ({}) satisfactoriamente", + + "rewind-notification": "Rebobinado debido a diferencia de tiempo con {}", # User + "fastforward-notification": "Adelantado debido a diferencia de tiempo con {}", # User + "slowdown-notification": "Ralentizando debido a diferencia de tiempo con {}", # User + "revert-notification": "Revirtiendo a la velocidad normal", + + "pause-notification": "{} pausado", # User + "unpause-notification": "{} resumido", # User + "seek-notification": "{} saltó desde {} hasta {}", # User, from time, to time + + "current-offset-notification": "Compensación actual: {} segundos", # Offset + + "media-directory-list-updated-notification": "Se han actualizado los directorios multimedia de Syncplay.", + + "room-join-notification": "{} se unió al canal: '{}'", # User + "left-notification": "{} se fue", # User + "left-paused-notification": "{} se fue, {} pausó", # User who left, User who paused + "playing-notification": "{} está reproduciendo '{}' ({})", # User, file, duration + "playing-notification/room-addendum": " en la sala: '{}'", # Room + + "not-all-ready": "No están listos: {}", # Usernames + "all-users-ready": "Todos están listos ({} users)", # Number of ready users + "ready-to-unpause-notification": "Se te ha establecido como listo - despausa nuevamente para resumir", + "set-as-ready-notification": "Se te ha establecido como listo", + "set-as-not-ready-notification": "Se te ha establecido como no-listo", + "autoplaying-notification": "Reproduciendo automáticamente en {}...", # Number of seconds until playback will start + + "identifying-as-controller-notification": "Autentificando como el operador de la sala, con contraseña '{}'...", + "failed-to-identify-as-controller-notification": "{} falló la autentificación como operador de la sala.", + "authenticated-as-controller-notification": "{} autentificado como operador de la sala", + "created-controlled-room-notification": "Sala administrada '{}' creada con contraseña '{}'. Por favor guarda esta información para referencias futuras!", # RoomName, operatorPassword + + "file-different-notification": "El archivo que reproduces parece ser diferente al archivo de {}", # User + "file-differences-notification": "Tu archivo difiere de la(s) siguiente(s) forma(s): {}", # Differences + "room-file-differences": "Diferencias de archivo: {}", # File differences (filename, size, and/or duration) + "file-difference-filename": "nombre", + "file-difference-filesize": "tamaño", + "file-difference-duration": "duración", + "alone-in-the-room": "Estás solo en la sala", + + "different-filesize-notification": " (el tamaño de su archivo difiere con el tuyo!)", + "userlist-playing-notification": "{} está reproduciendo:", # Username + "file-played-by-notification": "Archivo: {} está siendo reproducido por:", # File + "no-file-played-notification": "{} está ahora reproduciendo un archivo", # Username + "notplaying-notification": "Personas que no reproducen algún archivo:", + "userlist-room-notification": "En sala '{}':", # Room + "userlist-file-notification": "Archivo", + "controller-userlist-userflag": "Operador", + "ready-userlist-userflag": "Listo", + + "update-check-failed-notification": "No se pudo determinar automáticamente que Syncplay {} esté actualizado. ¿Te gustaría visitar https://syncplay.pl/ para buscar actualizaciones manualmente?", # Syncplay version + "syncplay-uptodate-notification": "Syncplay está actualizado", + "syncplay-updateavailable-notification": "Una nueva versión de Syncplay está disponible. ¿Te gustaría visitar la página del lanzamiento?", + + "mplayer-file-required-notification": "Al utilizar Syncplay con mplayer se debe proveer un archivo al inicio.", + "mplayer-file-required-notification/example": "Ejemplo de uso: syncplay [opciones] [url|ubicación/]nombreDelArchivo", + "mplayer2-required": "Syncplay no es compatible con MPlayer 1.x, por favor utiliza mplayer2 o mpv", + + "unrecognized-command-notification": "Comando no reconocido", + "commandlist-notification": "Comandos disponibles:", + "commandlist-notification/room": "\tr [nombre] - cambiar de sala", + "commandlist-notification/list": "\tl - mostrar lista de usuarios", + "commandlist-notification/undo": "\tu - deshacer última búsqueda", + "commandlist-notification/pause": "\tp - activar pausa", + "commandlist-notification/seek": "\t[s][+-]tiempo - ir al tiempo definido, si no se especifica + o -, será el tiempo absoluto en segundos o min:sec", + "commandlist-notification/help": "\th - esta ayuda", + "commandlist-notification/toggle": "\tt - activa/inactiva señal que estás listo para ver", + "commandlist-notification/create": "\tc [nombre] - crear sala administrada usando el nombre de la sala actual", + "commandlist-notification/auth": "\ta [contraseña] - autentificar como operador de la sala con la contraseña de operador", + "commandlist-notification/chat": "\tch [mensaje] - enviar un mensaje en la sala", + "syncplay-version-notification": "Versión de Syncplay: {}", # syncplay.version + "more-info-notification": "Más información disponible en: {}", # projectURL + + "gui-data-cleared-notification": "Syncplay limpió la ruta y el estado de la ventana utilizado por la GUI.", + "language-changed-msgbox-label": "El lenguaje se modificará cuando ejecutes Syncplay.", + "promptforupdate-label": "¿Está bien si Syncplay comprueba por actualizaciones automáticamente y de vez en cuando?", + + "media-player-latency-warning": "Advertencia: El reproductor multimedia tardó {} segundos en responder. Si experimentas problemas de sincronización, cierra otros programas para liberar recursos del sistema; si esto no funciona, intenta con otro reproductor multimedia.", # Seconds to respond + "mpv-unresponsive-error": "mpv no ha respondido por {} segundos. Al aparecer no está funcionando correctamente. Por favor reinicia Syncplay.", # Seconds to respond + + # Client prompts + "enter-to-exit-prompt": "Presiona intro para salir\n", + + # Client errors + "missing-arguments-error": "Están faltando algunos argumentos necesarios. Por favor revisa --help", + "server-timeout-error": "La conexión con el servidor ha caducado", + "mpc-slave-error": "No se logró iniciar MPC en modo esclavo!", + "mpc-version-insufficient-error": "La versión de MPC no es suficiente, por favor utiliza `mpc-hc` >= `{}`", + "mpc-be-version-insufficient-error": "La versión de MPC no es suficiente, por favor utiliza `mpc-be` >= `{}`", + "mpv-version-error": "Syncplay no es compatible con esta versión de mpv. Por favor utiliza una versión diferente de mpv (p.ej. Git HEAD).", + "player-file-open-error": "El reproductor falló al abrir el archivo", + "player-path-error": "La ruta del reproductor no está definida correctamente. Los reproductores soportados son: mpv, VLC, MPC-HC, MPC-BE y mplayer2", + "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-twisted-error": "No se logró importar Twisted. Por favor instala Twisted v12.1.0 o posterior.", + + "arguments-missing-error": "Están faltando algunos argumentos necesarios. Por favor revisa --help", + + "unable-to-start-client-error": "No se logró iniciar el cliente", + + "player-path-config-error": "La ruta del reproductor no está definida correctamente. Los reproductores soportados son: mpv, VLC, MPC-HC, MPC-BE y mplayer2.", + "no-file-path-config-error": "El archivo debe ser seleccionado antes de iniciar el reproductor", + "no-hostname-config-error": "El nombre del host no puede ser vacío", + "invalid-port-config-error": "El puerto debe ser válido", + "empty-value-config-error": "{} no puede ser vacío", # Config option + + "not-json-error": "No es una cadena de caracteres JSON válida\n", + "hello-arguments-error": "Not enough Hello arguments\n", # DO NOT TRANSLATE + "version-mismatch-error": "No coinciden las versiones del cliente y servidor\n", + "vlc-failed-connection": "Falló la conexión con VLC. Si no has instalado syncplay.lua y estás usando la última versión de VLC, por favor revisa https://syncplay.pl/LUA/ para obtener instrucciones.", + "vlc-failed-noscript": "VLC ha reportado que la interfaz syncplay.lua no se ha instalado. Por favor revisa https://syncplay.pl/LUA/ para obtener instrucciones.", + "vlc-failed-versioncheck": "Esta versión de VLC no está soportada por Syncplay.", + + "feature-sharedPlaylists": "listas de reproducción compartidas", # used for not-supported-by-server-error + "feature-chat": "chat", # used for not-supported-by-server-error + "feature-readiness": "preparación", # used for not-supported-by-server-error + "feature-managedRooms": "salas administradas", # used for not-supported-by-server-error + + "not-supported-by-server-error": "La característica {} no está soportada por este servidor..", # feature + "shared-playlists-not-supported-by-server-error": "El servidor no admite la función de listas de reproducción compartidas. Para asegurarse de que funciona correctamente, se requiere un servidor que ejecute Syncplay {}+, pero el servidor está ejecutando Syncplay {}.", # minVersion, serverVersion + "shared-playlists-disabled-by-server-error": "La función de lista de reproducción compartida no está habilitada en la configuración del servidor. Para utilizar esta función, debes conectarte a un servidor distinto.", + + "invalid-seek-value": "Valor de búsqueda inválido", + "invalid-offset-value": "Valor de desplazamiento inválido", + + "switch-file-not-found-error": "No se pudo cambiar el archivo '{0}'. Syncplay busca en los directorios de medios especificados.", # File not found + "folder-search-timeout-error": "Se anuló la búsqueda de medios en el directorio de medios, ya que tardó demasiado buscando en '{}'. Esto ocurrirá si seleccionas una carpeta con demasiadas subcarpetas en tu lista de carpetas de medios para buscar. Para que el cambio automático de archivos vuelva a funcionar, selecciona Archivo->Establecer directorios de medios en la barra de menú y elimina este directorio o reemplázalo con una subcarpeta apropiada. Si la carpeta está bien, puedes volver a reactivarlo seleccionando Archivo->Establecer directorios de medios y presionando 'OK'.", # Folder + "folder-search-first-file-timeout-error": "Se anuló la búsqueda de medios en '{}', ya que tardó demasiado buscando en acceder al directorio. Esto podría ocurrir si se trata de una unidad de red, o si tienes configurada la unidad para centrifugar luego de cierto período de inactividad. Para que el cambio automático de archivos vuelva a funcionar, por favor dirígete a Archivo->Establecer directorios de medios y elimina el directorio o resuelve el problema (p.ej. cambiando la configuración de ahorro de energía).", # Folder + "added-file-not-in-media-directory-error": "Has cargado un archivo en '{}' el cual no es un directorio de medios conocido. Puedes agregarlo como un directorio de medios seleccionado Archivo->Establecer directorios de medios en la barra de menú.", # Folder + "no-media-directories-error": "No se han establecido directorios de medios. Para que las funciones de lista de reproducción compartida y cambio de archivos funcionen correctamente, selecciona Archivo->Establecer directorios de medios y especifica dónde debe buscar Syncplay para encontrar archivos multimedia.", + "cannot-find-directory-error": "No se encontró el directorio de medios '{}'.Para actualizar tu lista de directorios de medios, seleccciona Archivo->Establecer directorios de medios desde la barra de menú y especifica dónde debe buscar Syncplay para encontrar archivos multimedia.", + + "failed-to-load-server-list-error": "Error al cargar la lista de servidor públicos. Por favor visita https://www.syncplay.pl/ en tu navegador.", + + # Client arguments + "argument-description": 'Solución para sincronizar la reproducción de múltiples instancias de reproductores de medios, a través de la red.', + "argument-epilog": 'Si no se especifican opciones, se utilizarán los valores de _config', + "nogui-argument": 'no mostrar GUI', + "host-argument": 'dirección del servidor', + "name-argument": 'nombre de usuario deseado', + "debug-argument": 'modo debug', + "force-gui-prompt-argument": 'hacer que aparezca el aviso de configuración', + "no-store-argument": 'no guardar valores en .syncplay', + "room-argument": 'sala por defecto', + "password-argument": 'contraseña del servidor', + "player-path-argument": 'ruta al ejecutable de tu reproductor', + "file-argument": 'archivo a reproducir', + "args-argument": 'opciones del reproductor, si necesitas pasar opciones que empiezan con -, pásalas utilizando \'--\'', + "clear-gui-data-argument": 'restablece ruta y los datos del estado de la ventana GUI almacenados como QSettings', + "language-argument": 'lenguaje para los mensajes de Syncplay (de/en/ru/it/es)', + + "version-argument": 'imprime tu versión', + "version-message": "Estás usando la versión de Syncplay {} ({})", + + # Client labels + "config-window-title": "Configuración de Syncplay", + + "connection-group-title": "Configuración de conexión", + "host-label": "Dirección del servidor: ", + "name-label": "Nombre de usuario (opcional):", + "password-label": "Contraseña del servidor (si corresponde):", + "room-label": "Sala por defecto: ", + + "media-setting-title": "Configuración del reproductor multimedia", + "executable-path-label": "Ruta al reproductor multimedia:", + "media-path-label": "Ruta al video (opcional):", + "player-arguments-label": "Argumentos del reproductor (si corresponde):", + "browse-label": "Visualizar", + "update-server-list-label": "Actualizar lista", + + "more-title": "Mostrar más configuraciones", + "never-rewind-value": "Nunca", + "seconds-suffix": " segs", + "privacy-sendraw-option": "Enviar crudo", + "privacy-sendhashed-option": "Enviar \"hasheado\"", + "privacy-dontsend-option": "No enviar", + "filename-privacy-label": "Información del nombre de archivo:", + "filesize-privacy-label": "Información del tamaño de archivo:", + "checkforupdatesautomatically-label": "Buscar actualizaciones de Syncplay automáticamente", + "slowondesync-label": "Ralentizar si hay una desincronización menor (no soportado en MPC-HC/BE)", + "rewindondesync-label": "Rebobinar si hay una desincronización mayor (recomendado)", + "fastforwardondesync-label": "Avanzar rápidamente si hay un retraso (recomendado)", + "dontslowdownwithme-label": "Nunca ralentizar ni rebobinar a otros (experimental)", + "pausing-title": "Pausando", + "pauseonleave-label": "Pausar cuando un usuario se va (p.ej. si se desconectan)", + "readiness-title": "Estado de preparación inicial", + "readyatstart-label": "Establecerme como \"listo-para-ver\" por defecto", + "forceguiprompt-label": "No mostrar siempre la ventana de configuración de Syncplay", # (Inverted) + "showosd-label": "Activar mensajes OSD", + + "showosdwarnings-label": "Incluir advertencias (p.ej. cuando los archivos son distintos, los usuarios no están listos)", + "showsameroomosd-label": "Incluir eventos en tu sala", + "shownoncontrollerosd-label": "Incluir eventos de no-operadores en salas administradas", + "showdifferentroomosd-label": "Incluir eventos en otras salas", + "showslowdownosd-label": "Incluir notificaciones de ralentización/reversión", + "language-label": "Lenguaje:", + "automatic-language": "Predeterminado ({})", # Default language + "showdurationnotification-label": "Advertir sobre discrepancias en la duración de los medios", + "basics-label": "Básicos", + "readiness-label": "Reproducir/Pausar", + "misc-label": "Misc.", + "core-behaviour-title": "Comportamiento de la sala central", + "syncplay-internals-title": "Internos de Syncplay", + "syncplay-mediasearchdirectories-title": "Directorios para buscar medios", + "syncplay-mediasearchdirectories-label": "Directorios para buscar medios (una ruta por línea)", + "sync-label": "Sincronizar", + "sync-otherslagging-title": "Si otros se están quedando atrás...", + "sync-youlaggging-title": "Si tú te estás quedando atrás...", + "messages-label": "Mensajes", + "messages-osd-title": "Configuraciones de visualización en pantalla", + "messages-other-title": "Otras configuraciones de visualización", + "chat-label": "Chat", + "privacy-label": "Privacidad", # Currently unused, but will be brought back if more space is needed in Misc tab + "privacy-title": "Configuración de privacidad", + "unpause-title": "Si presionas reproducir, definir como listo y:", + "unpause-ifalreadyready-option": "Despausar si ya está definido como listo", + "unpause-ifothersready-option": "Despausar si ya está listo u otros en la sala están listos (predeterminado)", + "unpause-ifminusersready-option": "Despausar si ya está listo, o si todos los demás están listos y el mín. de usuarios están listos", + "unpause-always": "Siempre despausar", + "syncplay-trusteddomains-title": "Dominios de confianza (para servicios de transmisión y contenido alojado)", + + "chat-title": "Entrada de mensaje de chat", + "chatinputenabled-label": "Habilitar entrada de chat a través de mpv", + "chatdirectinput-label": "Permitir entrada de chat instantánea (omitir tener que presionar Intro para chatear)", + "chatinputfont-label": "Fuente de entrada de chat", + "chatfont-label": "Establecer fuente", + "chatcolour-label": "Establecer color", + "chatinputposition-label": "Posición del área de entrada del mensaje en mpv", + "chat-top-option": "Arriba", + "chat-middle-option": "Medio", + "chat-bottom-option": "Fondo", + "chatoutputheader-label": "Salida de mensaje de chat", + "chatoutputfont-label": "Fuente de salida de chat", + "chatoutputenabled-label": "Habilitar salida de chat en el reproductor (solo mpv por ahora)", + "chatoutputposition-label": "Modo de salida", + "chat-chatroom-option": "Estilo de sala de chat", + "chat-scrolling-option": "Estilo de desplazamiento", + + "mpv-key-tab-hint": "[TAB] para alternar acceso a los accesos directos de las teclas de la fila del alfabeto", + "mpv-key-hint": "[INTRO] para enviar mensaje. [ESC] para salir del modo de chat.", + "alphakey-mode-warning-first-line": "Puedes usar temporalmente los enlaces de mpv con las teclas a-z.", + "alphakey-mode-warning-second-line": "Presiona [TAB] para retornar al modo de chat de Syncplay.", + + "help-label": "Ayuda", + "reset-label": "Restaurar valores predeterminados", + "run-label": "Ejecutar Syncplay", + "storeandrun-label": "Almacenar la configuración y ejecutar Syncplay", + + "contact-label": "No dudes en enviar un correo electrónico a dev@syncplay.pl, chatea a través del canal de IRC #Syncplay en irc.freenode.net, reportar un problema vía GitHub, danos \"me gusta\" en Facebook, síguenos en Twitter, o visita https://syncplay.pl/. No utilices Syncplay para enviar información sensible.", + + "joinroom-label": "Unirse a la sala", + "joinroom-menu-label": "Unirse a la sala {}", + "seektime-menu-label": "Buscar tiempo", + "undoseek-menu-label": "Deshacer búsqueda", + "play-menu-label": "Reproducir", + "pause-menu-label": "Pausar", + "playbackbuttons-menu-label": "Mostrar botones de reproducción", + "autoplay-menu-label": "Mostrar botón de auto-reproducción", + "autoplay-guipushbuttonlabel": "Reproducir cuando todos estén listos", + "autoplay-minimum-label": "Mín. de usuarios:", + + "sendmessage-label": "Enviar", + + "ready-guipushbuttonlabel": "¡Estoy listo para ver!", + + "roomuser-heading-label": "Sala / Usuario", + "size-heading-label": "Tamaño", + "duration-heading-label": "Duración", + "filename-heading-label": "Nombre de archivo", + "notifications-heading-label": "Notificaciones", + "userlist-heading-label": "Lista de quién reproduce qué", + + "browseformedia-label": "Buscar archivos multimedia", + + "file-menu-label": "&Archivo", # & precedes shortcut key + "openmedia-menu-label": "A&brir archivo multimedia", + "openstreamurl-menu-label": "Abrir URL de &flujo de medios", + "setmediadirectories-menu-label": "&Establecer directorios de medios", + "exit-menu-label": "&Salir", + "advanced-menu-label": "A&vanzado", + "window-menu-label": "&Ventana", + "setoffset-menu-label": "Establecer &compensación", + "createcontrolledroom-menu-label": "C&rear sala administrada", + "identifyascontroller-menu-label": "&Identificar como operador de sala", + "settrusteddomains-menu-label": "Es&tablecer dominios de confianza", + "addtrusteddomain-menu-label": "Agregar {} como dominio de confianza", # Domain + + "playback-menu-label": "Re&producción", + + "help-menu-label": "A&yuda", + "userguide-menu-label": "Abrir &guía de usuario", + "update-menu-label": "Buscar actuali&zaciones", + + "startTLS-initiated": "Intentando conexión segura", + "startTLS-secure-connection-ok": "Conexión segura establecida ({})", + "startTLS-server-certificate-invalid": 'Falló la conexión segura. El servidor utiliza un certificado inválido. Esta comunicación podría ser interceptada por un tercero. Para más detalles y solución de problemas, consulta aquí.', + "startTLS-not-supported-client": "Este cliente no soporta TLS", + "startTLS-not-supported-server": "Este servidor no soporta TLS", + + # TLS certificate dialog + "tls-information-title": "Detalles del certificado", + "tls-dialog-status-label": "Syncplay está utilizando una conexión cifrada con {}.", + "tls-dialog-desc-label": "El cifrado con un certificado digital, mantiene la información privada cuando se envía hacia o desde
el servidor {}.", + "tls-dialog-connection-label": "Información cifrada utilizando \"Transport Layer Security\" (TLS), versión {} con la
suite de cifrado: {}.", + "tls-dialog-certificate-label": "Certificado emitido por {} válido hasta {}.", + + # About dialog + "about-menu-label": "Acerca de Sy&ncplay", + "about-dialog-title": "Acerca de Syncplay", + "about-dialog-release": "Versión {} lanzamiento {}", + "about-dialog-license-text": "Licenciado bajo la Licencia Apache Versión 2.0", + "about-dialog-license-button": "Licencia", + "about-dialog-dependencies": "Dependencias", + + "setoffset-msgbox-label": "Establecer compensación", + "offsetinfo-msgbox-label": "Compensación (consulta https://syncplay.pl/guide/ para obtener instrucciones de uso):", + + "promptforstreamurl-msgbox-label": "Abrir URL de flujo de medios", + "promptforstreamurlinfo-msgbox-label": "Publicar URL", + + "addfolder-label": "Agregar carpeta", + + "adduris-msgbox-label": "Agregar URLs a la lista de reproducción (una por línea)", + "editplaylist-msgbox-label": "Establecer lista de reproducción (una por línea)", + "trusteddomains-msgbox-label": "Dominios con los cuales está bien intercambiar automáticamente (uno por línea)", + + "createcontrolledroom-msgbox-label": "Crear sala administrada", + "controlledroominfo-msgbox-label": "Ingresa el nombre de la sala administrada\r\n(consulta https://syncplay.pl/guide/ para obtener instrucciones de uso):", + + "identifyascontroller-msgbox-label": "Identificar como operador de la sala", + "identifyinfo-msgbox-label": "Ingresa la contraseña de operador para esta sala\r\n(consulta https://syncplay.pl/guide/ para obtener instrucciones de uso):", + + "public-server-msgbox-label": "Selecciona el servidor público para esta sesión de visualización", + + "megabyte-suffix": " MB", + + # Tooltips + + "host-tooltip": "Nombre de host o IP para conectarse, opcionalmente incluyendo puerto (p.ej. syncplay.pl:8999). Sólo sincronizado con personas en el mismo servidor/puerto.", + "name-tooltip": "Apodo por el que se te conocerá. No hay registro, por lo que puedes cambiarlo fácilmente más tarde. Si no se especifica, se genera un nombre aleatorio.", + "password-tooltip": "Las contraseñas son sólo necesarias para conectarse a servidores privados.", + "room-tooltip": "La sala para unirse en la conexión puede ser casi cualquier cosa, pero sólo se sincronizará con las personas en la misma sala.", + + "executable-path-tooltip": "Ubicación de tu reproductor multimedia compatible elegido (mpv, VLC, MPC-HC/BE o mplayer2).", + "media-path-tooltip": "Ubicación del video o flujo que se abrirá. Necesario para mplayer2.", + "player-arguments-tooltip": "Arguementos de línea de comandos adicionales / parámetros para pasar a este reproductor multimedia.", + "mediasearcdirectories-arguments-tooltip": "Directorios donde Syncplay buscará archivos de medios, p.ej. cuando estás usando la función \"clic para cambiar\". Syncplay buscará recursivamente a través de las subcarpetas.", + + "more-tooltip": "Mostrar configuraciones usadas con menos frecuencia.", + "filename-privacy-tooltip": "Modo de privacidad para enviar el nombre del archivo que se está reproduciendo actualmente al servidor.", + "filesize-privacy-tooltip": "Modo de privacidad para enviar el tamaño del archivo que se está reproduciendo actualmente al servidor.", + "privacy-sendraw-tooltip": "Enviar esta información sin ofuscación. Ésta es la opción predeterminada en la mayoría de las funciones.", + "privacy-sendhashed-tooltip": "Enviar una versión \"hasheada\" de la información, para que sea menos visible para otros clientes.", + "privacy-dontsend-tooltip": "No enviar esta información al servidor. Esto proporciona la máxima privacidad.", + "checkforupdatesautomatically-tooltip": "Regularmente verificar con el sitio Web de Syncplay para ver si hay una nueva versión de Syncplay disponible.", + "slowondesync-tooltip": "Reducir la velocidad de reproducción temporalmente cuando sea necesario, para volver a sincronizar con otros espectadores. No soportado en MPC-HC/BE.", + "dontslowdownwithme-tooltip": "Significa que otros no se ralentizan ni rebobinan si la reproducción se retrasa. Útil para operadores de la sala.", + "pauseonleave-tooltip": "Pausa la reproducción si te desconectas o alguien sale de tu sala.", + "readyatstart-tooltip": "Establecerte como 'listo' al inicio (de lo contrario, se te establecerá como 'no-listo' hasta que cambies tu estado de preparación)", + "forceguiprompt-tooltip": "El diálogo de configuración no es mostrado cuando se abre un archivo con Syncplay.", # (Inverted) + "nostore-tooltip": "Ejecutar Syncplay con la configuración dada, pero no guardar los cambios permanentemente.", # (Inverted) + "rewindondesync-tooltip": "Retroceder cuando sea necesario para volver a sincronizar. ¡Deshabilitar esta opción puede resultar en desincronizaciones importantes!", + "fastforwardondesync-tooltip": "Saltar hacia adelante cuando no está sincronizado con el operador de la sala (o tu posición ficticia 'Nunca ralentizar o rebobinar a otros' está activada).", + "showosd-tooltip": "Envía mensajes de Syncplay al reproductor multimedia OSD.", + "showosdwarnings-tooltip": "Mostrar advertencias si se está reproduciendo un archivo diferente, solo en la sala, usuarios no están listos, etc.", + "showsameroomosd-tooltip": "Mostrar notificaciones de OSD para eventos relacionados con la sala en la que está el usuario.", + "shownoncontrollerosd-tooltip": "Mostrar notificaciones de OSD para eventos relacionados con no-operadores que están en salas administradas.", + "showdifferentroomosd-tooltip": "Mostrar notificaciones de OSD para eventos relacionados la sala en la que no está el usuario.", + "showslowdownosd-tooltip": "Mostrar notificaciones de desaceleración / diferencia de la reversión.", + "showdurationnotification-tooltip": "Útil cuando falta un segmento de un archivo de varias partes, pero puede dar lugar a falsos positivos.", + "language-tooltip": "Idioma a ser utilizado por Syncplay.", + "unpause-always-tooltip": "Si presionas despausar siempre te pone como listo y despausa, en lugar de simplemente ponerte como listo.", + "unpause-ifalreadyready-tooltip": "Si presionas despausar cuando no estás listo, te pondrá como listo - presiona despausar nuevamente para despausar.", + "unpause-ifothersready-tooltip": "Si presionas despausar cuando no estás listo, sólo se despausará si los otros están listos.", + "unpause-ifminusersready-tooltip": "Si presionas despausar cuando no estás listo, sólo se despausará si los otros están listos y se cumple con el mínimo requerido de usuarios.", + "trusteddomains-arguments-tooltip": "Dominios con los cuales está bien intercambiar automáticamente, cuando las listas de reproducción compartidas están activas.", + + "chatinputenabled-tooltip": "Activa la entrada de chat en mpv (presiona intro para chatear, intro para enviar, escape para cancelar)", + "chatdirectinput-tooltip": "Omitir tener que presionar 'intro' para ir al modo de entrada de chat en mpv. Presiona TAB en mpv para desactivar temporalmente esta función.", + "font-label-tooltip": "Fuente utilizada cuando se ingresan mensajes de chat en mpv. Sólo del lado del cliente, por lo que no afecta lo que otros ven.", + "set-input-font-tooltip": "Familia de fuentes utilizada cuando se ingresan mensajes de chat en mpv. Sólo del lado del cliente, por lo que no afecta lo que otros ven.", + "set-input-colour-tooltip": "Color de fuente utilizado cuando se ingresan mensajes de chat en mpv. Sólo del lado del cliente, por lo que no afecta lo que otros ven.", + "chatinputposition-tooltip": "Ubicación en mpv donde aparecerán los mensajes de chat cuando se presione intro y se escriba.", + "chatinputposition-top-tooltip": "Colocar la entrada del chat en la parte superior de la ventana de mpv.", + "chatinputposition-middle-tooltip": "Colocar la entrada del chat en el centro muerto de la ventana de mpv.", + "chatinputposition-bottom-tooltip": "Colocar la entrada del chat en la parte inferior de la ventana de mpv.", + "chatoutputenabled-tooltip": "Mostrar mensajes de chat en OSD (si está soportado por el reproductor multimedia).", + "font-output-label-tooltip": "Fuente de salida del chat.", + "set-output-font-tooltip": "Fuente utilizada para mostrar mensajes de chat.", + "chatoutputmode-tooltip": "Cómo se muestran los mensajes de chat.", + "chatoutputmode-chatroom-tooltip": "Mostrar nuevas líneas de chat directamente debajo de la línea anterior.", + "chatoutputmode-scrolling-tooltip": "Desplazar el texto del chat de derecha a izquierda.", + + "help-tooltip": "Abrir la guía de usuario de Syncplay.pl.", + "reset-tooltip": "Restablecer todas las configuraciones a la configuración predeterminada.", + "update-server-list-tooltip": "Conectar a syncplay.pl para actualizar la lista de servidores públicos.", + + "sslconnection-tooltip": "Conectado de forma segura al servidor. Haga clic para obtener los detalles del certificado.", + + "joinroom-tooltip": "Abandonar la sala actual y unirse a la sala especificada.", + "seektime-msgbox-label": "Saltar al tiempo especificado (en segundos / min:seg). Usar +/- para una búsqueda relativa.", + "ready-tooltip": "Indica si estás listo para ver.", + "autoplay-tooltip": "Reproducir automáticamente cuando todos los usuarios que tienen indicador de preparación están listos, y se ha alcanzado el mínimo requerido de usuarios.", + "switch-to-file-tooltip": "Hacer doble clic para cambiar a {}", # Filename + "sendmessage-tooltip": "Enviar mensaje a la sala", + + # In-userlist notes (GUI) + "differentsize-note": "¡Tamaño diferente!", + "differentsizeandduration-note": "¡Tamaño y duración diferentes!", + "differentduration-note": "¡Duración diferente!", + "nofile-note": "(No se está reproduciendo ningún archivo)", + + # Server messages to client + "new-syncplay-available-motd-message": "Estás usando Syncplay {} pero hay una versión más nueva disponible en https://syncplay.pl", # ClientVersion + + # Server notifications + "welcome-server-notification": "Bienvenido al servidor de Syncplay, ver. {0}", # version + "client-connected-room-server-notification": "{0}({2}) conectado a la sala '{1}'", # username, host, room + "client-left-server-notification": "{0} abandonó el servidor", # name + "no-salt-notification": "IMPORTANTE: Para permitir que las contraseñas del operador de la sala, generadas por esta instancia del servidor, sigan funcionando cuando se reinicie el servidor, por favor en el futuro agregar el siguiente argumento de línea de comandos al ejecutar el servidor de Syncplay: --salt {}", # Salt + + + # Server arguments + "server-argument-description": 'Solución para sincronizar la reproducción de múltiples instancias de MPlayer y MPC-HC/BE a través de la red. Instancia del servidor', + "server-argument-epilog": 'Si no se especifican opciones, serán utilizados los valores de _config', + "server-port-argument": 'puerto TCP del servidor', + "server-password-argument": 'contraseña del servidor', + "server-isolate-room-argument": '¿las salas deberían estar aisladas?', + "server-salt-argument": "cadena aleatoria utilizada para generar contraseñas de salas administradas", + "server-disable-ready-argument": "deshabilitar la función de preparación", + "server-motd-argument": "ruta al archivo del cual se obtendrá el texto motd", + "server-chat-argument": "¿Debería deshabilitarse el chat?", + "server-chat-maxchars-argument": "Número máximo de caracteres en un mensaje de chat (el valor predeterminado es {})", # Default number of characters + "server-maxusernamelength-argument": "Número máximo de caracteres para el nombre de usuario (el valor predeterminado es {})", + "server-stats-db-file-argument": "Habilitar estadísticas del servidor utilizando el archivo db SQLite proporcionado", + "server-startTLS-argument": "Habilitar conexiones TLS usando los archivos de certificado en la ruta provista", + "server-messed-up-motd-unescaped-placeholders": "El mensaje del dia contiene marcadores de posición sin escapar. Todos los signos $ deberían ser dobles ($$).", + "server-messed-up-motd-too-long": "El mensaje del día es muy largo - máximo de {} caracteres, se recibieron {}.", + + # Server errors + "unknown-command-server-error": "Comando desconocido {}", # message + "not-json-server-error": "No es una cadena JSON válida {}", # message + "line-decode-server-error": "No es una cadena utf-8", + "not-known-server-error": "Debes ser reconocido por el servidor antes de enviar este comando", + "client-drop-server-error": "Caída del cliente: {} -- {}", # host, error + "password-required-server-error": "Contraseña requerida", + "wrong-password-server-error": "Contraseña ingresada incorrecta", + "hello-server-error": "Not enough Hello arguments", # DO NOT TRANSLATE + + # Playlists + "playlist-selection-changed-notification": "{} cambió la selección de la lista de reproducción", # Username + "playlist-contents-changed-notification": "{} actualizó la lista de reproducción", # Username + "cannot-find-file-for-playlist-switch-error": "¡No se encontró el archivo {} en el directorio de medios para intercambiar en la lista de reproducción!", # Filename + "cannot-add-duplicate-error": "No se pudo agregar una segunda entrada para '{}' a la lista de reproducción ya que no se admiten duplicados.", # Filename + "cannot-add-unsafe-path-error": "No se pudo cargar automáticamente {} porque no es un dominio de confianza. Puedes intercambiar la URL manualmente dándole doble clic en la lista de reproducción, y agregar dominios de confianza vía Archivo->Avanzado->Establecer dominios de confianza. Si haces doble clic en una URL entonces puedes agregar su dominio como un dominio de confianza, desde el menú de contexto.", # Filename + "sharedplaylistenabled-label": "Activar listas de reproducción compartidas", + "removefromplaylist-menu-label": "Remover de la lista de reproducción", + "shuffleremainingplaylist-menu-label": "Mezclar el resto de la lista de reproducción", + "shuffleentireplaylist-menu-label": "Mezclar toda la lista de reproducción", + "undoplaylist-menu-label": "Deshacer el último cambio a la lista de reproducción", + "addfilestoplaylist-menu-label": "Agregar archivo(s) al final de la lista de reproducción", + "addurlstoplaylist-menu-label": "Agregar URL(s) al final de la lista de reproducción", + "editplaylist-menu-label": "Editar lista de reproducción", + + "open-containing-folder": "Abrir directorio que contiene este archivo", + "addyourfiletoplaylist-menu-label": "Agregar tu archivo a la lista de reproducción", + "addotherusersfiletoplaylist-menu-label": "Agregar el archivo de {} a la lista de reproducción", # [Username] + "addyourstreamstoplaylist-menu-label": "Agregar tu flujo a la lista de reproducción", + "addotherusersstreamstoplaylist-menu-label": "Agregar el flujo de {} a la lista de reproducción", # [Username] + "openusersstream-menu-label": "Abrir el flujo de {}", # [username]'s + "openusersfile-menu-label": "Abrir el archivo de {}", # [username]'s + + "playlist-instruction-item-message": "Desplazar aquí el archivo para agregarlo a la lista de reproducción compartida.", + "sharedplaylistenabled-tooltip": "Los operadores de la sala pueden agregar archivos a una lista de reproducción sincronizada, para que visualizar la misma cosa sea más sencillo para todos. Configurar directorios multimedia en 'Misc'.", +} diff --git a/syncplay/messages_it.py b/syncplay/messages_it.py index b308c88..b0ba8cc 100755 --- a/syncplay/messages_it.py +++ b/syncplay/messages_it.py @@ -168,7 +168,7 @@ it = { "file-argument": 'file da riprodurre', "args-argument": 'opzioni del player, se hai bisogno di utilizzare opzioni che iniziano con - anteponi un singolo \'--\'', "clear-gui-data-argument": 'ripristina il percorso e i dati impostati tramite interfaccia grafica e salvati come QSettings', - "language-argument": 'lingua per i messaggi di Syncplay (de/en/ru/it)', + "language-argument": 'lingua per i messaggi di Syncplay (de/en/ru/it/es)', "version-argument": 'mostra la tua versione', "version-message": "Stai usando la versione di Syncplay {} ({})", diff --git a/syncplay/messages_ru.py b/syncplay/messages_ru.py index bd1abe7..38728f3 100755 --- a/syncplay/messages_ru.py +++ b/syncplay/messages_ru.py @@ -169,7 +169,7 @@ ru = { "file-argument": 'воспроизводимый файл', "args-argument": 'параметры проигрывателя; если нужно передать параметры, начинающиеся с - , то сначала пишите \'--\'', "clear-gui-data-argument": 'сбрасывает путь и данные о состоянии окна GUI, хранимые как QSettings', - "language-argument": 'язык сообщений Syncplay (de/en/ru)', + "language-argument": 'язык сообщений Syncplay (de/en/ru/it/es)', "version-argument": 'выводит номер версии', "version-message": "Вы используете Syncplay версии {} ({})", From 5d31aba2d6a9262015f08e42117adb9172519bc0 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Wed, 27 Feb 2019 11:16:29 +0100 Subject: [PATCH 008/105] Italian translation: resolve all the TODO messages --- syncplay/messages_it.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/syncplay/messages_it.py b/syncplay/messages_it.py index b0ba8cc..89ad8ca 100755 --- a/syncplay/messages_it.py +++ b/syncplay/messages_it.py @@ -267,7 +267,7 @@ it = { "run-label": "Avvia Syncplay", "storeandrun-label": "Salva la configurazione e avvia Syncplay", - "contact-label": "Sentiti libero di inviare un'e-mail a dev@syncplay.pl, chattare tramite il canale IRC #Syncplay su irc.freenode.net, segnalare un problema su GitHub, lasciare un like sulla nostra pagina Facebook, seguirci su Twitter, o visitare https://syncplay.pl/. Non usare Syncplay per inviare dati sensibili.", # TODO: Check translation + "contact-label": "Sentiti libero di inviare un'e-mail a dev@syncplay.pl, chattare tramite il canale IRC #Syncplay su irc.freenode.net, segnalare un problema su GitHub, lasciare un like sulla nostra pagina Facebook, seguirci su Twitter, o visitare https://syncplay.pl/. Non usare Syncplay per inviare dati sensibili.", "joinroom-label": "Entra nella stanza", "joinroom-menu-label": "Entra nella stanza {}", @@ -461,7 +461,7 @@ it = { # Server errors "unknown-command-server-error": "Comando non riconosciuto {}", # message "not-json-server-error": "Non è una stringa in codifica JSON {}", # message - "line-decode-server-error": "Not a utf-8 string", # TODO: Translate + "line-decode-server-error": "Non è una stringa utf-8", "not-known-server-error": "Devi essere autenticato dal server prima di poter inviare questo comando", "client-drop-server-error": "Il client è caduto: {} -- {}", # host, error "password-required-server-error": "È richiesta una password", @@ -484,12 +484,12 @@ it = { "editplaylist-menu-label": "Modifica la playlist", "open-containing-folder": "Apri la cartella contenente questo file", - "addyourfiletoplaylist-menu-label": "Aggiungi il file tuo alla playlist", # TODO needs testing - "addotherusersfiletoplaylist-menu-label": "Aggiungi il file di {} alla playlist", # Username # TODO needs testing - "addyourstreamstoplaylist-menu-label": "Aggiungi l'indirizzo tuo alla playlist", # TODO needs testing - "addotherusersstreamstoplaylist-menu-label": "Aggiungi l'indirizzo di {} alla playlist", # Username # item owner indicator # TODO needs testing - "openusersstream-menu-label": "Apri l'indirizzo di {}", # [username] # TODO needs testing - "openusersfile-menu-label": "Apri il file di {}", # [username]'s # TODO needs testing + "addyourfiletoplaylist-menu-label": "Aggiungi il tuo file alla playlist", + "addotherusersfiletoplaylist-menu-label": "Aggiungi il file di {} alla playlist", # Username + "addyourstreamstoplaylist-menu-label": "Aggiungi il tuo indirizzo alla playlist", + "addotherusersstreamstoplaylist-menu-label": "Aggiungi l'indirizzo di {} alla playlist", # Username # item owner indicator + "openusersstream-menu-label": "Apri l'indirizzo di {}", # [username] + "openusersfile-menu-label": "Apri il file di {}", # [username]'s "playlist-instruction-item-message": "Trascina qui i file per aggiungerli alla playlist condivisa.", "sharedplaylistenabled-tooltip": "Gli operatori della stanza possono aggiungere i file a una playlist sincronizzata per garantire che tutti i partecipanti stiano guardando la stessa cosa. Configura le cartelle multimediali alla voce 'Miscellanea'.", From b743ca1debf4f7bf0e089e79fffc9e9fedd89d43 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Wed, 27 Feb 2019 22:56:53 +0100 Subject: [PATCH 009/105] AppVeyor: limit build to master --- .appveyor.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index 87132ef..c746a4f 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,3 +1,7 @@ +branches: + only: + - master + environment: MINICONDA: "C:\\Miniconda" PYTHON: "C:\\Python35" From 6ca64847ebf663de7015300bce473f0abd49a14f Mon Sep 17 00:00:00 2001 From: Etoh Date: Wed, 27 Feb 2019 23:11:19 +0000 Subject: [PATCH 010/105] Upver to release 74 --- syncplay/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncplay/__init__.py b/syncplay/__init__.py index 3932bf1..d766cc0 100755 --- a/syncplay/__init__.py +++ b/syncplay/__init__.py @@ -1,5 +1,5 @@ version = '1.6.3' revision = ' beta' milestone = 'Yoitsu' -release_number = '73' +release_number = '74' projectURL = 'https://syncplay.pl/' From f39fe4c01b5998932ec169f87d3ca426eb981395 Mon Sep 17 00:00:00 2001 From: Etoh Date: Sun, 3 Mar 2019 20:54:02 +0000 Subject: [PATCH 011/105] Update Twisted version advice to >= v16.4.0 --- syncplay/messages_de.py | 2 +- syncplay/messages_en.py | 2 +- syncplay/messages_es.py | 2 +- syncplay/messages_it.py | 2 +- syncplay/messages_ru.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/syncplay/messages_de.py b/syncplay/messages_de.py index 372f7f2..cf43fa4 100755 --- a/syncplay/messages_de.py +++ b/syncplay/messages_de.py @@ -113,7 +113,7 @@ de = { "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-twisted-error": "Could not import Twisted. Please install Twisted v12.1.0 or later.", #To do: translate + "unable-import-twisted-error": "Could not import Twisted. Please install Twisted v16.4.0 or later.", #To do: translate "arguments-missing-error": "Notwendige Argumente fehlen, siehe --help", diff --git a/syncplay/messages_en.py b/syncplay/messages_en.py index e426a9d..7beee10 100755 --- a/syncplay/messages_en.py +++ b/syncplay/messages_en.py @@ -113,7 +113,7 @@ en = { "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-twisted-error": "Could not import Twisted. Please install Twisted v12.1.0 or later.", + "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", diff --git a/syncplay/messages_es.py b/syncplay/messages_es.py index c4d63b5..aa6f3d5 100644 --- a/syncplay/messages_es.py +++ b/syncplay/messages_es.py @@ -113,7 +113,7 @@ es = { "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-twisted-error": "No se logró importar Twisted. Por favor instala Twisted v12.1.0 o posterior.", + "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", diff --git a/syncplay/messages_it.py b/syncplay/messages_it.py index 89ad8ca..753f6ed 100755 --- a/syncplay/messages_it.py +++ b/syncplay/messages_it.py @@ -113,7 +113,7 @@ it = { "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-twisted-error": "Non è possibile importare Twisted. Si prega di installare Twisted v12.1. o superiore.", + "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", diff --git a/syncplay/messages_ru.py b/syncplay/messages_ru.py index 38728f3..cf7c155 100755 --- a/syncplay/messages_ru.py +++ b/syncplay/messages_ru.py @@ -113,7 +113,7 @@ ru = { "empty-error": "{} не может быть пустым.", # Configuration "media-player-error": "Ошибка проигрывателя: \"{}\"", # Error line "unable-import-gui-error": "Невозможно импортировать библиотеки GUI (графического интерфейса). Необходимо установить PySide, иначе графический интерфейс не будет работать.", - "unable-import-twisted-error": "Could not import Twisted. Please install Twisted v12.1.0 or later.", #To do: translate + "unable-import-twisted-error": "Could not import Twisted. Please install Twisted v16.4.0 or later.", #To do: translate "arguments-missing-error": "Некоторые необходимые аргументы отсутствуют, обратитесь к --help", From 3fd498ee6d13c2ffe0ab5adb17a55064e1b46d4c Mon Sep 17 00:00:00 2001 From: Etoh Date: Sun, 10 Mar 2019 19:28:38 +0000 Subject: [PATCH 012/105] Support high DPI in Windows installer --- buildPy2exe.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildPy2exe.py b/buildPy2exe.py index ff67342..0415a16 100644 --- a/buildPy2exe.py +++ b/buildPy2exe.py @@ -69,6 +69,7 @@ NSIS_SCRIPT_TEMPLATE = r""" OutFile "Syncplay-$version-Setup.exe" InstallDir $$PROGRAMFILES\Syncplay RequestExecutionLevel admin + ManifestDPIAware true XPStyle on Icon resources\icon.ico ;Change DIR SetCompressor /SOLID lzma @@ -737,4 +738,4 @@ info = dict( ) sys.argv.extend(['py2exe', '-p win32com ', '-i twisted.web.resource', '-p PySide2']) -setup(**info) \ No newline at end of file +setup(**info) From 22eec119b1cca09b3fcc1a3957dfa4c7bcaec4db Mon Sep 17 00:00:00 2001 From: Etoh Date: Sun, 10 Mar 2019 23:09:06 +0000 Subject: [PATCH 013/105] Support high DPI in Windows installer (v2) --- buildPy2exe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildPy2exe.py b/buildPy2exe.py index 0415a16..de662c3 100644 --- a/buildPy2exe.py +++ b/buildPy2exe.py @@ -69,7 +69,7 @@ NSIS_SCRIPT_TEMPLATE = r""" OutFile "Syncplay-$version-Setup.exe" InstallDir $$PROGRAMFILES\Syncplay RequestExecutionLevel admin - ManifestDPIAware true + ManifestDPIAware false XPStyle on Icon resources\icon.ico ;Change DIR SetCompressor /SOLID lzma From c07206c18992c1dca401b30a01b9f0fe54a71df5 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Thu, 14 Mar 2019 15:45:55 +0100 Subject: [PATCH 014/105] Run mpv subprocess with a system PYTHONPATH env on macOS. youtube-dl relies on system python to run on macOS, but system python cannot be executed in a subprocess created from the frozen python3 executable. This makes youtube-dl unusable from frozen versions of Syncplay on macOS. So, the environment of the mpv subprocess is modified with system PYTHONPATH, allowing the execution of /usr/bin/python (and hence, of youtube-dl) from within the subprocess in frozen executables. Fixes: #228 --- syncplay/players/mplayer.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/syncplay/players/mplayer.py b/syncplay/players/mplayer.py index 69fa0d2..b1baa6b 100755 --- a/syncplay/players/mplayer.py +++ b/syncplay/players/mplayer.py @@ -1,4 +1,5 @@ # coding:utf8 +import ast import os import re import subprocess @@ -10,7 +11,7 @@ import time from syncplay import constants, utils from syncplay.players.basePlayer import BasePlayer from syncplay.messages import getMessage -from syncplay.utils import isWindows +from syncplay.utils import isMacOS, isWindows class MplayerPlayer(BasePlayer): @@ -338,6 +339,20 @@ class MplayerPlayer(BasePlayer): env = os.environ.copy() if 'TERM' in env: del env['TERM'] + # On macOS, youtube-dl requires system python to run. Set the environment + # to allow that version of python to be executed in the mpv subprocess. + if isMacOS(): + try: + pythonLibs = subprocess.check_output(['/usr/bin/python', '-E', '-c', + 'import sys; print(sys.path)'], + text=True, env=dict()) + pythonLibs = ast.literal_eval(pythonLibs) + pythonPath = ':'.join(pythonLibs[1:]) + except: + pythonPath = None + if pythonPath is not None: + env['PATH'] = '/usr/bin:/usr/local/bin' + env['PYTHONPATH'] = pythonPath if filePath: self.__process = subprocess.Popen( call, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT, From bcf8174b7d4ae723c4bb9788d701a646367a023f Mon Sep 17 00:00:00 2001 From: Etoh Date: Fri, 15 Mar 2019 11:21:49 +0000 Subject: [PATCH 015/105] Mark as 1.6.3 release --- syncplay/__init__.py | 4 ++-- syncplay/constants.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/syncplay/__init__.py b/syncplay/__init__.py index d766cc0..613ca26 100755 --- a/syncplay/__init__.py +++ b/syncplay/__init__.py @@ -1,5 +1,5 @@ version = '1.6.3' -revision = ' beta' +revision = '' milestone = 'Yoitsu' -release_number = '74' +release_number = '75' projectURL = 'https://syncplay.pl/' diff --git a/syncplay/constants.py b/syncplay/constants.py index 5217a7a..49c69d4 100755 --- a/syncplay/constants.py +++ b/syncplay/constants.py @@ -9,7 +9,7 @@ MPLAYER_OSD_LEVEL = 1 UI_TIME_FORMAT = "[%X] " CONFIG_NAMES = [".syncplay", "syncplay.ini"] # Syncplay searches first to last DEFAULT_CONFIG_NAME = "syncplay.ini" -RECENT_CLIENT_THRESHOLD = "1.6.0" # This and higher considered 'recent' clients (no warnings) +RECENT_CLIENT_THRESHOLD = "1.6.3" # This and higher considered 'recent' clients (no warnings) WARN_OLD_CLIENTS = True # Use MOTD to inform old clients to upgrade LIST_RELATIVE_CONFIGS = True # Print list of relative configs loaded SHOW_CONTACT_INFO = True # Displays dev contact details below list in GUI From 281d8023fd0e06e346f0e2c9a3e61a12ffeeac02 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Sat, 13 Apr 2019 15:39:55 +0200 Subject: [PATCH 016/105] Edit folder structure and add setuptools support (#231) * setuptools: Initial commit * setuptools: remove the .py extension from installed commands * setuptools: restructure scripts to use entry_points in setup.py * setuptools: include TLS dependencies and remove unneeded code * setuptools: change resources path * AppVeyor: upgrade Python and py2exe, embed TLS dependencies * buildpy2exe: fix path for resources * AppVeyor: upgrade py2exe and PySide2 * Amend setup.py according to the suggestions from PR #230 * Insert TLS dependencies in requirements * AppVeyor: fix build for master * AppVeyor: revert to PySide2 5.12.0 --- .appveyor.yml | 12 ++-- .gitignore | 2 +- .travis.yml | 2 +- GNUmakefile | 18 ++--- MANIFEST.in | 6 ++ appdmg.py | 4 +- buildPy2app.py | 6 +- buildPy2exe.py | 29 ++++---- requirements.txt | 3 +- requirements_tls.txt | 2 - setup.py | 64 ++++++++++++++++++ syncplay/ep_client.py | 11 +++ syncplay/ep_server.py | 58 ++++++++++++++++ {resources => syncplay/resources}/accept.png | Bin .../resources}/application_get.png | Bin .../resources}/arrow_refresh.png | Bin .../resources}/arrow_switch.png | Bin .../resources}/arrow_undo.png | Bin .../resources}/bullet_right_grey.png | Bin .../resources}/chevrons_right.png | Bin .../resources}/clock_go.png | Bin {resources => syncplay/resources}/cog.png | Bin .../resources}/cog_delete.png | Bin .../resources}/comments.png | Bin .../resources}/control_pause_blue.png | Bin .../resources}/control_play_blue.png | Bin {resources => syncplay/resources}/cross.png | Bin .../resources}/cross_checkbox.png | Bin {resources => syncplay/resources}/delete.png | Bin {resources => syncplay/resources}/door_in.png | Bin .../resources}/email_go.png | Bin .../resources}/empty_checkbox.png | Bin {resources => syncplay/resources}/error.png | Bin {resources => syncplay/resources}/eye.png | Bin .../resources}/film_add.png | Bin .../resources}/film_edit.png | Bin .../resources}/film_folder_edit.png | Bin {resources => syncplay/resources}/film_go.png | Bin .../resources}/film_link.png | Bin .../resources}/folder_explore.png | Bin .../resources}/folder_film.png | Bin {resources => syncplay/resources}/help.png | Bin .../hicolor/128x128/apps/syncplay.png | Bin .../hicolor/16x16/apps/syncplay.png | Bin .../hicolor/24x24/apps/syncplay.png | Bin .../hicolor/256x256/apps/syncplay.png | Bin .../hicolor/32x32/apps/syncplay.png | Bin .../hicolor/48x48/apps/syncplay.png | Bin .../hicolor/64x64/apps/syncplay.png | Bin .../hicolor/96x96/apps/syncplay.png | Bin {resources => syncplay/resources}/house.png | Bin {resources => syncplay/resources}/icon.icns | Bin {resources => syncplay/resources}/icon.ico | Bin {resources => syncplay/resources}/key_go.png | Bin {resources => syncplay/resources}/license.rtf | 0 {resources => syncplay/resources}/lock.png | Bin .../resources}/lock_green.png | Bin .../resources}/lock_green_dialog.png | Bin .../resources}/lock_open.png | Bin .../resources}/lua/intf/syncplay.lua | 0 .../resources}/macOS_dmg_bkg.tiff | Bin .../resources}/macOS_readme.pdf | Bin .../resources}/man/changelog.md | 0 {resources => syncplay/resources}/mpc-be.png | Bin {resources => syncplay/resources}/mpc-hc.png | Bin .../resources}/mpc-hc64.png | Bin {resources => syncplay/resources}/mplayer.png | Bin {resources => syncplay/resources}/mpv.png | Bin .../resources}/page_white_key.png | Bin .../resources}/shield_add.png | Bin .../resources}/shield_edit.png | Bin {resources => syncplay/resources}/spinner.mng | Bin .../resources}/syncplay-server.desktop | 0 .../resources}/syncplay.desktop | 0 .../resources}/syncplay.png | Bin .../resources}/syncplayintf.lua | 0 .../resources}/table_refresh.png | Bin .../resources}/third-party-notices.rtf | 0 {resources => syncplay/resources}/tick.png | Bin .../resources}/tick_checkbox.png | Bin .../resources}/timeline_marker.png | Bin .../resources}/user_comment.png | Bin .../resources}/user_key.png | Bin {resources => syncplay/resources}/vlc.png | Bin .../resources}/world_add.png | Bin .../resources}/world_explore.png | Bin .../resources}/world_go.png | Bin syncplay/utils.py | 4 +- syncplayClient.py | 6 +- syncplayServer.py | 54 +-------------- 90 files changed, 185 insertions(+), 96 deletions(-) create mode 100644 MANIFEST.in mode change 100644 => 100755 buildPy2exe.py delete mode 100644 requirements_tls.txt create mode 100644 setup.py create mode 100644 syncplay/ep_client.py create mode 100644 syncplay/ep_server.py rename {resources => syncplay/resources}/accept.png (100%) rename {resources => syncplay/resources}/application_get.png (100%) rename {resources => syncplay/resources}/arrow_refresh.png (100%) rename {resources => syncplay/resources}/arrow_switch.png (100%) rename {resources => syncplay/resources}/arrow_undo.png (100%) rename {resources => syncplay/resources}/bullet_right_grey.png (100%) rename {resources => syncplay/resources}/chevrons_right.png (100%) rename {resources => syncplay/resources}/clock_go.png (100%) rename {resources => syncplay/resources}/cog.png (100%) rename {resources => syncplay/resources}/cog_delete.png (100%) rename {resources => syncplay/resources}/comments.png (100%) rename {resources => syncplay/resources}/control_pause_blue.png (100%) rename {resources => syncplay/resources}/control_play_blue.png (100%) rename {resources => syncplay/resources}/cross.png (100%) rename {resources => syncplay/resources}/cross_checkbox.png (100%) rename {resources => syncplay/resources}/delete.png (100%) rename {resources => syncplay/resources}/door_in.png (100%) rename {resources => syncplay/resources}/email_go.png (100%) rename {resources => syncplay/resources}/empty_checkbox.png (100%) rename {resources => syncplay/resources}/error.png (100%) rename {resources => syncplay/resources}/eye.png (100%) rename {resources => syncplay/resources}/film_add.png (100%) rename {resources => syncplay/resources}/film_edit.png (100%) rename {resources => syncplay/resources}/film_folder_edit.png (100%) rename {resources => syncplay/resources}/film_go.png (100%) rename {resources => syncplay/resources}/film_link.png (100%) rename {resources => syncplay/resources}/folder_explore.png (100%) rename {resources => syncplay/resources}/folder_film.png (100%) rename {resources => syncplay/resources}/help.png (100%) rename {resources => syncplay/resources}/hicolor/128x128/apps/syncplay.png (100%) rename {resources => syncplay/resources}/hicolor/16x16/apps/syncplay.png (100%) rename {resources => syncplay/resources}/hicolor/24x24/apps/syncplay.png (100%) rename {resources => syncplay/resources}/hicolor/256x256/apps/syncplay.png (100%) rename {resources => syncplay/resources}/hicolor/32x32/apps/syncplay.png (100%) rename {resources => syncplay/resources}/hicolor/48x48/apps/syncplay.png (100%) rename {resources => syncplay/resources}/hicolor/64x64/apps/syncplay.png (100%) rename {resources => syncplay/resources}/hicolor/96x96/apps/syncplay.png (100%) rename {resources => syncplay/resources}/house.png (100%) rename {resources => syncplay/resources}/icon.icns (100%) rename {resources => syncplay/resources}/icon.ico (100%) rename {resources => syncplay/resources}/key_go.png (100%) rename {resources => syncplay/resources}/license.rtf (100%) rename {resources => syncplay/resources}/lock.png (100%) rename {resources => syncplay/resources}/lock_green.png (100%) rename {resources => syncplay/resources}/lock_green_dialog.png (100%) rename {resources => syncplay/resources}/lock_open.png (100%) rename {resources => syncplay/resources}/lua/intf/syncplay.lua (100%) rename {resources => syncplay/resources}/macOS_dmg_bkg.tiff (100%) rename {resources => syncplay/resources}/macOS_readme.pdf (100%) rename {resources => syncplay/resources}/man/changelog.md (100%) rename {resources => syncplay/resources}/mpc-be.png (100%) rename {resources => syncplay/resources}/mpc-hc.png (100%) rename {resources => syncplay/resources}/mpc-hc64.png (100%) rename {resources => syncplay/resources}/mplayer.png (100%) rename {resources => syncplay/resources}/mpv.png (100%) rename {resources => syncplay/resources}/page_white_key.png (100%) rename {resources => syncplay/resources}/shield_add.png (100%) rename {resources => syncplay/resources}/shield_edit.png (100%) rename {resources => syncplay/resources}/spinner.mng (100%) rename {resources => syncplay/resources}/syncplay-server.desktop (100%) rename {resources => syncplay/resources}/syncplay.desktop (100%) rename {resources => syncplay/resources}/syncplay.png (100%) rename {resources => syncplay/resources}/syncplayintf.lua (100%) rename {resources => syncplay/resources}/table_refresh.png (100%) rename {resources => syncplay/resources}/third-party-notices.rtf (100%) rename {resources => syncplay/resources}/tick.png (100%) rename {resources => syncplay/resources}/tick_checkbox.png (100%) rename {resources => syncplay/resources}/timeline_marker.png (100%) rename {resources => syncplay/resources}/user_comment.png (100%) rename {resources => syncplay/resources}/user_key.png (100%) rename {resources => syncplay/resources}/vlc.png (100%) rename {resources => syncplay/resources}/world_add.png (100%) rename {resources => syncplay/resources}/world_explore.png (100%) rename {resources => syncplay/resources}/world_go.png (100%) diff --git a/.appveyor.yml b/.appveyor.yml index c746a4f..3611be7 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -4,8 +4,8 @@ branches: environment: MINICONDA: "C:\\Miniconda" - PYTHON: "C:\\Python35" - PYTHON_VERSION: 3.5 + PYTHON: "C:\\Python36" + PYTHON_VERSION: 3.6 PYTHON_ARCH: 32 platform: x86 @@ -19,12 +19,12 @@ init: - python --version - python -m pip install -U pip setuptools wheel - pip install -U pypiwin32==223 - - pip install twisted + - pip install twisted[tls] certifi - pip install zope.interface - type nul > %PYTHON%\lib\site-packages\zope\__init__.py - - curl -L https://bintray.com/alby128/Syncplay/download_file?file_path=py2exe-0.9.2.2-py33.py34.py35-none-any.whl -o py2exe-0.9.2.2-py33.py34.py35-none-any.whl - - pip install py2exe-0.9.2.2-py33.py34.py35-none-any.whl - - del py2exe-0.9.2.2-py33.py34.py35-none-any.whl + - curl -L https://bintray.com/alby128/py2exe/download_file?file_path=py2exe-0.9.3.0-cp36-none-win32.whl -o py2exe-0.9.3.0-cp36-none-win32.whl + - pip install py2exe-0.9.3.0-cp36-none-win32.whl + - del py2exe-0.9.3.0-cp36-none-win32.whl - pip install shiboken2==5.12.0 PySide2==5.12.0 - pip freeze diff --git a/.gitignore b/.gitignore index 95fe6f5..298a39b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ *.exe venv -/SyncPlay.egg-info +/*.egg-info /build /cert /dist diff --git a/.travis.yml b/.travis.yml index fd8ec48..cf4d283 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ install: before_deploy: - pip3 install dmgbuild - mkdir dist_dmg -- mv resources/macOS_readme.pdf resources/.macOS_readme.pdf +- mv syncplay/resources/macOS_readme.pdf syncplay/resources/.macOS_readme.pdf - export VER="$(cat syncplay/__init__.py | awk '/version/ {gsub("\047", "", $3); print $NF}')" - dmgbuild -s appdmg.py "Syncplay" dist_dmg/Syncplay_${VER}.dmg - python3 bintray_version.py diff --git a/GNUmakefile b/GNUmakefile index 6936f70..d68b634 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -35,18 +35,18 @@ endif SHARE_PATH = ${DESTDIR}${PREFIX}/share common: - -mkdir -p $(LIB_PATH)/syncplay/resources/lua/intf + -mkdir -p $(LIB_PATH)/syncplay/syncplay/resources/lua/intf -mkdir -p $(APP_SHORTCUT_PATH) -mkdir -p $(SHARE_PATH)/app-install/icons -mkdir -p $(SHARE_PATH)/pixmaps/ cp -r syncplay $(LIB_PATH)/syncplay/ chmod 755 $(LIB_PATH)/syncplay/ - cp -r resources/hicolor $(SHARE_PATH)/icons/ - cp -r resources/*.png $(LIB_PATH)/syncplay/resources/ - cp -r resources/*.lua $(LIB_PATH)/syncplay/resources/ - cp -r resources/lua/intf/*.lua $(LIB_PATH)/syncplay/resources/lua/intf/ - cp resources/hicolor/48x48/apps/syncplay.png $(SHARE_PATH)/app-install/icons/ - cp resources/hicolor/48x48/apps/syncplay.png $(SHARE_PATH)/pixmaps/ + cp -r syncplay/resources/hicolor $(SHARE_PATH)/icons/ + cp -r syncplay/resources/*.png $(LIB_PATH)/syncplay/syncplay/resources/ + cp -r syncplay/resources/*.lua $(LIB_PATH)/syncplay/syncplay/resources/ + cp -r syncplay/resources/lua/intf/*.lua $(LIB_PATH)/syncplay/syncplay/resources/lua/intf/ + cp syncplay/resources/hicolor/48x48/apps/syncplay.png $(SHARE_PATH)/app-install/icons/ + cp syncplay/resources/hicolor/48x48/apps/syncplay.png $(SHARE_PATH)/pixmaps/ u-common: -rm -rf $(LIB_PATH)/syncplay @@ -60,7 +60,7 @@ client: sed -i -e '/# libpath/ a\import site\nsite.addsitedir\("${PREFIX}/lib/syncplay"\)' $(BIN_PATH)/syncplay chmod 755 $(BIN_PATH)/syncplay cp syncplayClient.py $(LIB_PATH)/syncplay/ - cp resources/syncplay.desktop $(APP_SHORTCUT_PATH)/ + cp syncplay/resources/syncplay.desktop $(APP_SHORTCUT_PATH)/ ifeq ($(SINGLE_USER),false) chmod 755 $(APP_SHORTCUT_PATH)/syncplay.desktop @@ -79,7 +79,7 @@ server: sed -i -e '/# libpath/ a\import site\nsite.addsitedir\("${PREFIX}/lib/syncplay"\)' $(BIN_PATH)/syncplay-server chmod 755 $(BIN_PATH)/syncplay-server cp syncplayServer.py $(LIB_PATH)/syncplay/ - cp resources/syncplay-server.desktop $(APP_SHORTCUT_PATH)/ + cp syncplay/resources/syncplay-server.desktop $(APP_SHORTCUT_PATH)/ ifeq ($(SINGLE_USER),false) chmod 755 $(APP_SHORTCUT_PATH)/syncplay-server.desktop diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..f3809a6 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,6 @@ +include LICENSE +include syncplay/resources/*.png +include syncplay/resources/*.mng +include syncplay/resources/*.lua +include syncplay/resources/*.rtf +include syncplay/resources/lua/intf/*.lua \ No newline at end of file diff --git a/appdmg.py b/appdmg.py index 8c23084..2c08dd9 100755 --- a/appdmg.py +++ b/appdmg.py @@ -31,7 +31,7 @@ size = defines.get('size', None) # Files to include files = [ application, - 'resources/.macOS_readme.pdf' + 'syncplay/resources/.macOS_readme.pdf' ] # Symlinks to create @@ -78,7 +78,7 @@ icon_locations = { # # Other color components may be expressed either in the range 0 to 1, or # as percentages (e.g. 60% is equivalent to 0.6). -background = 'resources/macOS_dmg_bkg.tiff' +background = 'syncplay/resources/macOS_dmg_bkg.tiff' show_status_bar = False show_tab_view = False diff --git a/buildPy2app.py b/buildPy2app.py index 4e921c9..68e6466 100755 --- a/buildPy2app.py +++ b/buildPy2app.py @@ -11,11 +11,11 @@ import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ - ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), - ('resources/lua/intf', glob('resources/lua/intf/*.lua')) + ('resources', glob('syncplay/resources/*.png') + glob('syncplay/resources/*.rtf') + glob('syncplay/resources/*.lua')), + ('resources/lua/intf', glob('syncplay/resources/lua/intf/*.lua')) ] OPTIONS = { - 'iconfile': 'resources/icon.icns', + 'iconfile': 'syncplay/resources/icon.icns', 'extra_scripts': 'syncplayServer.py', 'includes': {'PySide2.QtCore', 'PySide2.QtUiTools', 'PySide2.QtGui', 'PySide2.QtWidgets', 'certifi', 'cffi'}, 'excludes': {'PySide', 'PySide.QtCore', 'PySide.QtUiTools', 'PySide.QtGui'}, diff --git a/buildPy2exe.py b/buildPy2exe.py old mode 100644 new mode 100755 index de662c3..d9a60d7 --- a/buildPy2exe.py +++ b/buildPy2exe.py @@ -71,7 +71,7 @@ NSIS_SCRIPT_TEMPLATE = r""" RequestExecutionLevel admin ManifestDPIAware false XPStyle on - Icon resources\icon.ico ;Change DIR + Icon syncplay\resources\icon.ico ;Change DIR SetCompressor /SOLID lzma VIProductVersion "$version.0" @@ -157,7 +157,7 @@ NSIS_SCRIPT_TEMPLATE = r""" LangString ^ClickInstall $${LANG_GERMAN} " " PageEx license - LicenseData resources\license.rtf + LicenseData syncplay\resources\license.rtf PageExEnd Page custom DirectoryCustom DirectoryCustomLeave Page instFiles @@ -690,15 +690,18 @@ guiIcons = [ 'resources/email_go.png', 'resources/world_add.png', 'resources/film_add.png', 'resources/delete.png', 'resources/spinner.mng' ] + +guiIcons = ['syncplay/' + s for s in guiIcons] + resources = [ - "resources/icon.ico", - "resources/syncplay.png", - "resources/syncplayintf.lua", - "resources/license.rtf", - "resources/third-party-notices.rtf" + "syncplay/resources/icon.ico", + "syncplay/resources/syncplay.png", + "syncplay/resources/syncplayintf.lua", + "syncplay/resources/license.rtf", + "syncplay/resources/third-party-notices.rtf" ] resources.extend(guiIcons) -intf_resources = ["resources/lua/intf/syncplay.lua"] +intf_resources = ["syncplay/resources/lua/intf/syncplay.lua"] qt_plugins = ['platforms\\qwindows.dll', 'styles\\qwindowsvistastyle.dll'] @@ -714,7 +717,7 @@ info = dict( common_info, windows=[{ "script": "syncplayClient.py", - "icon_resources": [(1, "resources\\icon.ico")], + "icon_resources": [(1, "syncplay\\resources\\icon.ico")], 'dest_base': "Syncplay"}, ], console=['syncplayServer.py'], @@ -724,8 +727,8 @@ info = dict( options={ 'py2exe': { 'dist_dir': OUT_DIR, - 'packages': 'PySide2', - 'includes': 'twisted, sys, encodings, datetime, os, time, math, liburl, ast, unicodedata, _ssl, win32pipe, win32file', + 'packages': 'PySide2, cffi, OpenSSL, certifi', + 'includes': 'twisted, sys, encodings, datetime, os, time, math, urllib, ast, unicodedata, _ssl, win32pipe, win32file', 'excludes': 'venv, doctest, pdb, unittest, win32clipboard, win32pdh, win32security, win32trace, win32ui, winxpgui, win32process, Tkinter', 'dll_excludes': 'msvcr71.dll, MSVCP90.dll, POWRPROF.dll', 'optimize': 2, @@ -737,5 +740,5 @@ info = dict( cmdclass={"py2exe": build_installer}, ) -sys.argv.extend(['py2exe', '-p win32com ', '-i twisted.web.resource', '-p PySide2']) -setup(**info) +sys.argv.extend(['py2exe']) +setup(**info) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 949df73..84f4305 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ -twisted>=16.4.0 +certifi>=2018.11.29 +twisted[tls]>=16.4.0 appnope>=0.1.0; sys_platform == 'darwin' pypiwin32>=223; sys_platform == 'win32' zope.inteface>=4.4.0; sys_platform == 'win32' \ No newline at end of file diff --git a/requirements_tls.txt b/requirements_tls.txt deleted file mode 100644 index 5a7646a..0000000 --- a/requirements_tls.txt +++ /dev/null @@ -1,2 +0,0 @@ -certifi>=2018.11.29 -twisted[tls]>=16.4.0 \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..91b2602 --- /dev/null +++ b/setup.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python3 + +import distutils.command.install_scripts +import setuptools + +from syncplay import projectURL, version as syncplay_version + +def read(fname): + with open(fname, 'r') as f: + return f.read() + +installRequirements = read('requirements.txt').splitlines() +\ + read('requirements_gui.txt').splitlines() + +setuptools.setup( + name="syncplay", + version=syncplay_version, + author="Syncplay", + author_email="dev@syncplay.pl", + description=' '.join([ + 'Client/server to synchronize media playback', + 'on mpv/VLC/MPC-HC/MPC-BE on many computers' + ]), + long_description=read('README.md'), + long_description_content_type="text/markdown", + url=projectURL, + download_url=projectURL + 'download/', + packages=setuptools.find_packages(), + install_requires=installRequirements, + python_requires=">=3.4", + entry_points={ + 'console_scripts': [ + 'syncplay-server = syncplay.ep_server:main', + ], + 'gui_scripts': [ + 'syncplay = syncplay.ep_client:main', + ] + }, + include_package_data=True, + classifiers=[ + "Development Status :: 5 - Production/Stable", + "Environment :: MacOS X :: Cocoa", + "Environment :: Win32 (MS Windows)", + "Environment :: X11 Applications :: Qt", + "Framework :: Twisted", + "Intended Audience :: End Users/Desktop", + "License :: OSI Approved :: Apache Software License", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX :: Linux", + "Natural Language :: English", + "Natural Language :: German", + "Natural Language :: Italian", + "Natural Language :: Russian", + "Natural Language :: Spanish", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Topic :: Internet", + "Topic :: Multimedia :: Video" + ], +) \ No newline at end of file diff --git a/syncplay/ep_client.py b/syncplay/ep_client.py new file mode 100644 index 0000000..f93793b --- /dev/null +++ b/syncplay/ep_client.py @@ -0,0 +1,11 @@ +import sys + +from syncplay.clientManager import SyncplayClientManager +from syncplay.utils import blackholeStdoutForFrozenWindow + +def main(): + blackholeStdoutForFrozenWindow() + SyncplayClientManager().run() + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/syncplay/ep_server.py b/syncplay/ep_server.py new file mode 100644 index 0000000..7bb899e --- /dev/null +++ b/syncplay/ep_server.py @@ -0,0 +1,58 @@ +import socket +import sys + +from twisted.internet import reactor +from twisted.internet.endpoints import TCP4ServerEndpoint, TCP6ServerEndpoint +from twisted.internet.error import CannotListenError + +from syncplay.server import SyncFactory, ConfigurationGetter + +class ServerStatus: pass + +def isListening6(f): + ServerStatus.listening6 = True + +def isListening4(f): + ServerStatus.listening4 = True + +def failed6(f): + ServerStatus.listening6 = False + print(f.value) + print("IPv6 listening failed.") + +def failed4(f): + ServerStatus.listening4 = False + if f.type is CannotListenError and ServerStatus.listening6: + pass + else: + print(f.value) + print("IPv4 listening failed.") + +def main(): + argsGetter = ConfigurationGetter() + args = argsGetter.getConfiguration() + factory = SyncFactory( + args.port, + args.password, + args.motd_file, + args.isolate_rooms, + args.salt, + args.disable_ready, + args.disable_chat, + args.max_chat_message_length, + args.max_username_length, + args.stats_db_file, + args.tls + ) + endpoint6 = TCP6ServerEndpoint(reactor, int(args.port)) + endpoint6.listen(factory).addCallbacks(isListening6, failed6) + endpoint4 = TCP4ServerEndpoint(reactor, int(args.port)) + endpoint4.listen(factory).addCallbacks(isListening4, failed4) + if ServerStatus.listening6 or ServerStatus.listening4: + reactor.run() + else: + print("Unable to listen using either IPv4 and IPv6 protocols. Quitting the server now.") + sys.exit() + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/resources/accept.png b/syncplay/resources/accept.png similarity index 100% rename from resources/accept.png rename to syncplay/resources/accept.png diff --git a/resources/application_get.png b/syncplay/resources/application_get.png similarity index 100% rename from resources/application_get.png rename to syncplay/resources/application_get.png diff --git a/resources/arrow_refresh.png b/syncplay/resources/arrow_refresh.png similarity index 100% rename from resources/arrow_refresh.png rename to syncplay/resources/arrow_refresh.png diff --git a/resources/arrow_switch.png b/syncplay/resources/arrow_switch.png similarity index 100% rename from resources/arrow_switch.png rename to syncplay/resources/arrow_switch.png diff --git a/resources/arrow_undo.png b/syncplay/resources/arrow_undo.png similarity index 100% rename from resources/arrow_undo.png rename to syncplay/resources/arrow_undo.png diff --git a/resources/bullet_right_grey.png b/syncplay/resources/bullet_right_grey.png similarity index 100% rename from resources/bullet_right_grey.png rename to syncplay/resources/bullet_right_grey.png diff --git a/resources/chevrons_right.png b/syncplay/resources/chevrons_right.png similarity index 100% rename from resources/chevrons_right.png rename to syncplay/resources/chevrons_right.png diff --git a/resources/clock_go.png b/syncplay/resources/clock_go.png similarity index 100% rename from resources/clock_go.png rename to syncplay/resources/clock_go.png diff --git a/resources/cog.png b/syncplay/resources/cog.png similarity index 100% rename from resources/cog.png rename to syncplay/resources/cog.png diff --git a/resources/cog_delete.png b/syncplay/resources/cog_delete.png similarity index 100% rename from resources/cog_delete.png rename to syncplay/resources/cog_delete.png diff --git a/resources/comments.png b/syncplay/resources/comments.png similarity index 100% rename from resources/comments.png rename to syncplay/resources/comments.png diff --git a/resources/control_pause_blue.png b/syncplay/resources/control_pause_blue.png similarity index 100% rename from resources/control_pause_blue.png rename to syncplay/resources/control_pause_blue.png diff --git a/resources/control_play_blue.png b/syncplay/resources/control_play_blue.png similarity index 100% rename from resources/control_play_blue.png rename to syncplay/resources/control_play_blue.png diff --git a/resources/cross.png b/syncplay/resources/cross.png similarity index 100% rename from resources/cross.png rename to syncplay/resources/cross.png diff --git a/resources/cross_checkbox.png b/syncplay/resources/cross_checkbox.png similarity index 100% rename from resources/cross_checkbox.png rename to syncplay/resources/cross_checkbox.png diff --git a/resources/delete.png b/syncplay/resources/delete.png similarity index 100% rename from resources/delete.png rename to syncplay/resources/delete.png diff --git a/resources/door_in.png b/syncplay/resources/door_in.png similarity index 100% rename from resources/door_in.png rename to syncplay/resources/door_in.png diff --git a/resources/email_go.png b/syncplay/resources/email_go.png similarity index 100% rename from resources/email_go.png rename to syncplay/resources/email_go.png diff --git a/resources/empty_checkbox.png b/syncplay/resources/empty_checkbox.png similarity index 100% rename from resources/empty_checkbox.png rename to syncplay/resources/empty_checkbox.png diff --git a/resources/error.png b/syncplay/resources/error.png similarity index 100% rename from resources/error.png rename to syncplay/resources/error.png diff --git a/resources/eye.png b/syncplay/resources/eye.png similarity index 100% rename from resources/eye.png rename to syncplay/resources/eye.png diff --git a/resources/film_add.png b/syncplay/resources/film_add.png similarity index 100% rename from resources/film_add.png rename to syncplay/resources/film_add.png diff --git a/resources/film_edit.png b/syncplay/resources/film_edit.png similarity index 100% rename from resources/film_edit.png rename to syncplay/resources/film_edit.png diff --git a/resources/film_folder_edit.png b/syncplay/resources/film_folder_edit.png similarity index 100% rename from resources/film_folder_edit.png rename to syncplay/resources/film_folder_edit.png diff --git a/resources/film_go.png b/syncplay/resources/film_go.png similarity index 100% rename from resources/film_go.png rename to syncplay/resources/film_go.png diff --git a/resources/film_link.png b/syncplay/resources/film_link.png similarity index 100% rename from resources/film_link.png rename to syncplay/resources/film_link.png diff --git a/resources/folder_explore.png b/syncplay/resources/folder_explore.png similarity index 100% rename from resources/folder_explore.png rename to syncplay/resources/folder_explore.png diff --git a/resources/folder_film.png b/syncplay/resources/folder_film.png similarity index 100% rename from resources/folder_film.png rename to syncplay/resources/folder_film.png diff --git a/resources/help.png b/syncplay/resources/help.png similarity index 100% rename from resources/help.png rename to syncplay/resources/help.png diff --git a/resources/hicolor/128x128/apps/syncplay.png b/syncplay/resources/hicolor/128x128/apps/syncplay.png similarity index 100% rename from resources/hicolor/128x128/apps/syncplay.png rename to syncplay/resources/hicolor/128x128/apps/syncplay.png diff --git a/resources/hicolor/16x16/apps/syncplay.png b/syncplay/resources/hicolor/16x16/apps/syncplay.png similarity index 100% rename from resources/hicolor/16x16/apps/syncplay.png rename to syncplay/resources/hicolor/16x16/apps/syncplay.png diff --git a/resources/hicolor/24x24/apps/syncplay.png b/syncplay/resources/hicolor/24x24/apps/syncplay.png similarity index 100% rename from resources/hicolor/24x24/apps/syncplay.png rename to syncplay/resources/hicolor/24x24/apps/syncplay.png diff --git a/resources/hicolor/256x256/apps/syncplay.png b/syncplay/resources/hicolor/256x256/apps/syncplay.png similarity index 100% rename from resources/hicolor/256x256/apps/syncplay.png rename to syncplay/resources/hicolor/256x256/apps/syncplay.png diff --git a/resources/hicolor/32x32/apps/syncplay.png b/syncplay/resources/hicolor/32x32/apps/syncplay.png similarity index 100% rename from resources/hicolor/32x32/apps/syncplay.png rename to syncplay/resources/hicolor/32x32/apps/syncplay.png diff --git a/resources/hicolor/48x48/apps/syncplay.png b/syncplay/resources/hicolor/48x48/apps/syncplay.png similarity index 100% rename from resources/hicolor/48x48/apps/syncplay.png rename to syncplay/resources/hicolor/48x48/apps/syncplay.png diff --git a/resources/hicolor/64x64/apps/syncplay.png b/syncplay/resources/hicolor/64x64/apps/syncplay.png similarity index 100% rename from resources/hicolor/64x64/apps/syncplay.png rename to syncplay/resources/hicolor/64x64/apps/syncplay.png diff --git a/resources/hicolor/96x96/apps/syncplay.png b/syncplay/resources/hicolor/96x96/apps/syncplay.png similarity index 100% rename from resources/hicolor/96x96/apps/syncplay.png rename to syncplay/resources/hicolor/96x96/apps/syncplay.png diff --git a/resources/house.png b/syncplay/resources/house.png similarity index 100% rename from resources/house.png rename to syncplay/resources/house.png diff --git a/resources/icon.icns b/syncplay/resources/icon.icns similarity index 100% rename from resources/icon.icns rename to syncplay/resources/icon.icns diff --git a/resources/icon.ico b/syncplay/resources/icon.ico similarity index 100% rename from resources/icon.ico rename to syncplay/resources/icon.ico diff --git a/resources/key_go.png b/syncplay/resources/key_go.png similarity index 100% rename from resources/key_go.png rename to syncplay/resources/key_go.png diff --git a/resources/license.rtf b/syncplay/resources/license.rtf similarity index 100% rename from resources/license.rtf rename to syncplay/resources/license.rtf diff --git a/resources/lock.png b/syncplay/resources/lock.png similarity index 100% rename from resources/lock.png rename to syncplay/resources/lock.png diff --git a/resources/lock_green.png b/syncplay/resources/lock_green.png similarity index 100% rename from resources/lock_green.png rename to syncplay/resources/lock_green.png diff --git a/resources/lock_green_dialog.png b/syncplay/resources/lock_green_dialog.png similarity index 100% rename from resources/lock_green_dialog.png rename to syncplay/resources/lock_green_dialog.png diff --git a/resources/lock_open.png b/syncplay/resources/lock_open.png similarity index 100% rename from resources/lock_open.png rename to syncplay/resources/lock_open.png diff --git a/resources/lua/intf/syncplay.lua b/syncplay/resources/lua/intf/syncplay.lua similarity index 100% rename from resources/lua/intf/syncplay.lua rename to syncplay/resources/lua/intf/syncplay.lua diff --git a/resources/macOS_dmg_bkg.tiff b/syncplay/resources/macOS_dmg_bkg.tiff similarity index 100% rename from resources/macOS_dmg_bkg.tiff rename to syncplay/resources/macOS_dmg_bkg.tiff diff --git a/resources/macOS_readme.pdf b/syncplay/resources/macOS_readme.pdf similarity index 100% rename from resources/macOS_readme.pdf rename to syncplay/resources/macOS_readme.pdf diff --git a/resources/man/changelog.md b/syncplay/resources/man/changelog.md similarity index 100% rename from resources/man/changelog.md rename to syncplay/resources/man/changelog.md diff --git a/resources/mpc-be.png b/syncplay/resources/mpc-be.png similarity index 100% rename from resources/mpc-be.png rename to syncplay/resources/mpc-be.png diff --git a/resources/mpc-hc.png b/syncplay/resources/mpc-hc.png similarity index 100% rename from resources/mpc-hc.png rename to syncplay/resources/mpc-hc.png diff --git a/resources/mpc-hc64.png b/syncplay/resources/mpc-hc64.png similarity index 100% rename from resources/mpc-hc64.png rename to syncplay/resources/mpc-hc64.png diff --git a/resources/mplayer.png b/syncplay/resources/mplayer.png similarity index 100% rename from resources/mplayer.png rename to syncplay/resources/mplayer.png diff --git a/resources/mpv.png b/syncplay/resources/mpv.png similarity index 100% rename from resources/mpv.png rename to syncplay/resources/mpv.png diff --git a/resources/page_white_key.png b/syncplay/resources/page_white_key.png similarity index 100% rename from resources/page_white_key.png rename to syncplay/resources/page_white_key.png diff --git a/resources/shield_add.png b/syncplay/resources/shield_add.png similarity index 100% rename from resources/shield_add.png rename to syncplay/resources/shield_add.png diff --git a/resources/shield_edit.png b/syncplay/resources/shield_edit.png similarity index 100% rename from resources/shield_edit.png rename to syncplay/resources/shield_edit.png diff --git a/resources/spinner.mng b/syncplay/resources/spinner.mng similarity index 100% rename from resources/spinner.mng rename to syncplay/resources/spinner.mng diff --git a/resources/syncplay-server.desktop b/syncplay/resources/syncplay-server.desktop similarity index 100% rename from resources/syncplay-server.desktop rename to syncplay/resources/syncplay-server.desktop diff --git a/resources/syncplay.desktop b/syncplay/resources/syncplay.desktop similarity index 100% rename from resources/syncplay.desktop rename to syncplay/resources/syncplay.desktop diff --git a/resources/syncplay.png b/syncplay/resources/syncplay.png similarity index 100% rename from resources/syncplay.png rename to syncplay/resources/syncplay.png diff --git a/resources/syncplayintf.lua b/syncplay/resources/syncplayintf.lua similarity index 100% rename from resources/syncplayintf.lua rename to syncplay/resources/syncplayintf.lua diff --git a/resources/table_refresh.png b/syncplay/resources/table_refresh.png similarity index 100% rename from resources/table_refresh.png rename to syncplay/resources/table_refresh.png diff --git a/resources/third-party-notices.rtf b/syncplay/resources/third-party-notices.rtf similarity index 100% rename from resources/third-party-notices.rtf rename to syncplay/resources/third-party-notices.rtf diff --git a/resources/tick.png b/syncplay/resources/tick.png similarity index 100% rename from resources/tick.png rename to syncplay/resources/tick.png diff --git a/resources/tick_checkbox.png b/syncplay/resources/tick_checkbox.png similarity index 100% rename from resources/tick_checkbox.png rename to syncplay/resources/tick_checkbox.png diff --git a/resources/timeline_marker.png b/syncplay/resources/timeline_marker.png similarity index 100% rename from resources/timeline_marker.png rename to syncplay/resources/timeline_marker.png diff --git a/resources/user_comment.png b/syncplay/resources/user_comment.png similarity index 100% rename from resources/user_comment.png rename to syncplay/resources/user_comment.png diff --git a/resources/user_key.png b/syncplay/resources/user_key.png similarity index 100% rename from resources/user_key.png rename to syncplay/resources/user_key.png diff --git a/resources/vlc.png b/syncplay/resources/vlc.png similarity index 100% rename from resources/vlc.png rename to syncplay/resources/vlc.png diff --git a/resources/world_add.png b/syncplay/resources/world_add.png similarity index 100% rename from resources/world_add.png rename to syncplay/resources/world_add.png diff --git a/resources/world_explore.png b/syncplay/resources/world_explore.png similarity index 100% rename from resources/world_explore.png rename to syncplay/resources/world_explore.png diff --git a/resources/world_go.png b/syncplay/resources/world_go.png similarity index 100% rename from resources/world_go.png rename to syncplay/resources/world_go.png diff --git a/syncplay/utils.py b/syncplay/utils.py index 776889b..6b49129 100755 --- a/syncplay/utils.py +++ b/syncplay/utils.py @@ -147,7 +147,7 @@ def isASCII(s): def findResourcePath(resourceName): if resourceName == "syncplay.lua": - resourcePath = os.path.join(findWorkingDir(),"resources", "lua", "intf", resourceName) + resourcePath = os.path.join(findWorkingDir(), "resources", "lua", "intf", resourceName) else: resourcePath = os.path.join(findWorkingDir(), "resources", resourceName) return resourcePath @@ -156,7 +156,7 @@ def findResourcePath(resourceName): def findWorkingDir(): frozen = getattr(sys, 'frozen', '') if not frozen: - path = os.path.dirname(os.path.dirname(__file__)) + path = os.path.dirname(__file__) elif frozen in ('dll', 'console_exe', 'windows_exe', 'macosx_app'): path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) elif frozen: # needed for PyInstaller diff --git a/syncplayClient.py b/syncplayClient.py index dad7ac3..2f40d78 100755 --- a/syncplayClient.py +++ b/syncplayClient.py @@ -11,9 +11,7 @@ except AttributeError: import warnings warnings.warn("You must run Syncplay with Python 3.4 or newer!") -from syncplay.clientManager import SyncplayClientManager -from syncplay.utils import blackholeStdoutForFrozenWindow +from syncplay import ep_client if __name__ == '__main__': - blackholeStdoutForFrozenWindow() - SyncplayClientManager().run() + ep_client.main() \ No newline at end of file diff --git a/syncplayServer.py b/syncplayServer.py index b0538d3..369714f 100755 --- a/syncplayServer.py +++ b/syncplayServer.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 #coding:utf8 -import socket import sys # libpath @@ -13,56 +12,7 @@ except AttributeError: import warnings warnings.warn("You must run Syncplay with Python 3.4 or newer!") -from twisted.internet import reactor -from twisted.internet.endpoints import TCP4ServerEndpoint, TCP6ServerEndpoint -from twisted.internet.error import CannotListenError - -from syncplay.server import SyncFactory, ConfigurationGetter - -class ServerStatus: pass - -def isListening6(f): - ServerStatus.listening6 = True - -def isListening4(f): - ServerStatus.listening4 = True - -def failed6(f): - ServerStatus.listening6 = False - print(f.value) - print("IPv6 listening failed.") - -def failed4(f): - ServerStatus.listening4 = False - if f.type is CannotListenError and ServerStatus.listening6: - pass - else: - print(f.value) - print("IPv4 listening failed.") - +from syncplay import ep_server if __name__ == '__main__': - argsGetter = ConfigurationGetter() - args = argsGetter.getConfiguration() - factory = SyncFactory( - args.port, - args.password, - args.motd_file, - args.isolate_rooms, - args.salt, - args.disable_ready, - args.disable_chat, - args.max_chat_message_length, - args.max_username_length, - args.stats_db_file, - args.tls - ) - endpoint6 = TCP6ServerEndpoint(reactor, int(args.port)) - endpoint6.listen(factory).addCallbacks(isListening6, failed6) - endpoint4 = TCP4ServerEndpoint(reactor, int(args.port)) - endpoint4.listen(factory).addCallbacks(isListening4, failed4) - if ServerStatus.listening6 or ServerStatus.listening4: - reactor.run() - else: - print("Unable to listen using either IPv4 and IPv6 protocols. Quitting the server now.") - sys.exit() + ep_server.main() \ No newline at end of file From 5a9e2cde23804e623e311d87398861cd1862c583 Mon Sep 17 00:00:00 2001 From: Etoh Date: Tue, 16 Apr 2019 20:52:46 +0100 Subject: [PATCH 017/105] Don't identify mpv SMPlayer as mplayer (#234) --- syncplay/players/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncplay/players/__init__.py b/syncplay/players/__init__.py index 6ba79d3..9fb3563 100755 --- a/syncplay/players/__init__.py +++ b/syncplay/players/__init__.py @@ -14,4 +14,4 @@ except ImportError: def getAvailablePlayers(): - return [MPCHCAPIPlayer, MplayerPlayer, MpvPlayer, VlcPlayer, MpcBePlayer] + return [MPCHCAPIPlayer, MpvPlayer, VlcPlayer, MpcBePlayer, MplayerPlayer] From ca9e1875e992e80e3f94364b13ad525c3ffde8b8 Mon Sep 17 00:00:00 2001 From: Etoh Date: Wed, 1 May 2019 19:14:51 +0100 Subject: [PATCH 018/105] Config dialog: Remove 'update list' button and tweak sizes (#233) Also aligns executable input with other inputs --- syncplay/ui/GuiConfiguration.py | 56 ++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/syncplay/ui/GuiConfiguration.py b/syncplay/ui/GuiConfiguration.py index 2ef7d65..069f279 100755 --- a/syncplay/ui/GuiConfiguration.py +++ b/syncplay/ui/GuiConfiguration.py @@ -134,7 +134,7 @@ class ConfigDialog(QtWidgets.QDialog): self.mediabrowseButton.show() self.saveMoreState(False) self.stackedLayout.setCurrentIndex(0) - newHeight = self.connectionSettingsGroup.minimumSizeHint().height() + self.mediaplayerSettingsGroup.minimumSizeHint().height() + self.bottomButtonFrame.minimumSizeHint().height() + 3 + newHeight = self.connectionSettingsGroup.minimumSizeHint().height() + self.mediaplayerSettingsGroup.minimumSizeHint().height() + self.bottomButtonFrame.minimumSizeHint().height() + 13 if self.error: newHeight += self.errorLabel.height()+3 self.stackedFrame.setFixedHeight(newHeight) @@ -584,11 +584,7 @@ class ConfigDialog(QtWidgets.QDialog): i += 1 self.hostCombobox.setEditable(True) self.hostCombobox.setEditText(host) - self.hostCombobox.setFixedWidth(250) self.hostLabel = QLabel(getMessage("host-label"), self) - self.findServerButton = QtWidgets.QPushButton(QtGui.QIcon(resourcespath + 'arrow_refresh.png'), getMessage("update-server-list-label")) - self.findServerButton.clicked.connect(self.updateServerList) - self.findServerButton.setToolTip(getMessage("update-server-list-tooltip")) self.usernameTextbox = QLineEdit(self) self.usernameTextbox.setObjectName("name") @@ -610,18 +606,16 @@ class ConfigDialog(QtWidgets.QDialog): self.defaultroomLabel.setObjectName("room") self.defaultroomTextbox.setObjectName("room") - self.defaultroomTextbox.setMaxLength(constants.MAX_ROOM_NAME_LENGTH) - self.connectionSettingsLayout = QtWidgets.QGridLayout() self.connectionSettingsLayout.addWidget(self.hostLabel, 0, 0) self.connectionSettingsLayout.addWidget(self.hostCombobox, 0, 1) - self.connectionSettingsLayout.addWidget(self.findServerButton, 0, 2) self.connectionSettingsLayout.addWidget(self.serverpassLabel, 1, 0) - self.connectionSettingsLayout.addWidget(self.serverpassTextbox, 1, 1, 1, 2) + self.connectionSettingsLayout.addWidget(self.serverpassTextbox, 1, 1) self.connectionSettingsLayout.addWidget(self.usernameLabel, 2, 0) - self.connectionSettingsLayout.addWidget(self.usernameTextbox, 2, 1, 1, 2) + self.connectionSettingsLayout.addWidget(self.usernameTextbox, 2, 1) self.connectionSettingsLayout.addWidget(self.defaultroomLabel, 3, 0) - self.connectionSettingsLayout.addWidget(self.defaultroomTextbox, 3, 1, 1, 2) + self.connectionSettingsLayout.addWidget(self.defaultroomTextbox, 3, 1) + self.connectionSettingsLayout.setSpacing(10) self.connectionSettingsGroup.setLayout(self.connectionSettingsLayout) self.connectionSettingsGroup.setMaximumHeight(self.connectionSettingsGroup.minimumSizeHint().height()) @@ -632,13 +626,12 @@ class ConfigDialog(QtWidgets.QDialog): self.mediaplayerSettingsGroup = QtWidgets.QGroupBox(getMessage("media-setting-title")) self.executableiconImage = QtGui.QImage() self.executableiconLabel = QLabel(self) - self.executableiconLabel.setMinimumWidth(16) + self.executableiconLabel.setFixedWidth(16) self.executableiconLabel.setAlignment(Qt.AlignRight | Qt.AlignVCenter) self.executablepathCombobox = QtWidgets.QComboBox(self) self.executablepathCombobox.setEditable(True) self.executablepathCombobox.currentIndexChanged.connect(self.updateExecutableIcon) self.executablepathCombobox.setEditText(self._tryToFillPlayerPath(config['playerPath'], playerpaths)) - self.executablepathCombobox.setFixedWidth(330) self.executablepathCombobox.editTextChanged.connect(self.updateExecutableIcon) self.executablepathLabel = QLabel(getMessage("executable-path-label"), self) @@ -657,17 +650,37 @@ class ConfigDialog(QtWidgets.QDialog): self.playerargsTextbox.setObjectName(constants.LOAD_SAVE_MANUALLY_MARKER + "player-arguments") self.mediaplayerSettingsLayout = QtWidgets.QGridLayout() - self.mediaplayerSettingsLayout.addWidget(self.executablepathLabel, 0, 0) - self.mediaplayerSettingsLayout.addWidget(self.executableiconLabel, 0, 1) - self.mediaplayerSettingsLayout.addWidget(self.executablepathCombobox, 0, 2) - self.mediaplayerSettingsLayout.addWidget(self.executablebrowseButton, 0, 3) - self.mediaplayerSettingsLayout.addWidget(self.mediapathLabel, 1, 0) - self.mediaplayerSettingsLayout.addWidget(self.mediapathTextbox, 1, 2) - self.mediaplayerSettingsLayout.addWidget(self.mediabrowseButton, 1, 3) + self.mediaplayerSettingsLayout.addWidget(self.executablepathLabel, 0, 0, 1, 1) + self.mediaplayerSettingsLayout.addWidget(self.executableiconLabel, 0, 1, 1, 1) + self.mediaplayerSettingsLayout.addWidget(self.executablepathCombobox, 0, 2, 1, 1) + self.mediaplayerSettingsLayout.addWidget(self.executablebrowseButton, 0, 3, 1, 1) + self.mediaplayerSettingsLayout.addWidget(self.mediapathLabel, 1, 0, 1, 2) + self.mediaplayerSettingsLayout.addWidget(self.mediapathTextbox, 1, 2, 1, 1) + self.mediaplayerSettingsLayout.addWidget(self.mediabrowseButton, 1, 3, 1, 1) self.mediaplayerSettingsLayout.addWidget(self.playerargsLabel, 2, 0, 1, 2) self.mediaplayerSettingsLayout.addWidget(self.playerargsTextbox, 2, 2, 1, 2) + self.mediaplayerSettingsLayout.setSpacing(10) self.mediaplayerSettingsGroup.setLayout(self.mediaplayerSettingsLayout) + iconWidth = self.executableiconLabel.minimumSize().width()+self.mediaplayerSettingsLayout.spacing() + maxWidth = max( + self.hostLabel.minimumSizeHint().width(), + self.usernameLabel.minimumSizeHint().width(), + self.serverpassLabel.minimumSizeHint().width(), + self.defaultroomLabel.minimumSizeHint().width(), + self.executablepathLabel.minimumSizeHint().width(), + self.mediapathLabel.minimumSizeHint().width(), + self.playerargsLabel.minimumSizeHint().width() + ) + + self.hostLabel.setMinimumWidth(maxWidth+iconWidth) + self.usernameLabel.setMinimumWidth(maxWidth+iconWidth) + self.serverpassLabel.setMinimumWidth(maxWidth+iconWidth) + self.defaultroomLabel.setMinimumWidth(maxWidth+iconWidth) + self.executablepathLabel.setMinimumWidth(maxWidth) + self.mediapathLabel.setMinimumWidth(maxWidth+iconWidth) + self.playerargsLabel.setMinimumWidth(maxWidth+iconWidth) + self.showmoreCheckbox = QCheckBox(getMessage("more-title")) self.showmoreCheckbox.setObjectName(constants.LOAD_SAVE_MANUALLY_MARKER + "more") @@ -1331,7 +1344,7 @@ class ConfigDialog(QtWidgets.QDialog): self.mediapathTextbox.show() self.mediapathLabel.show() self.mediabrowseButton.show() - newHeight = self.connectionSettingsGroup.minimumSizeHint().height()+self.mediaplayerSettingsGroup.minimumSizeHint().height()+self.bottomButtonFrame.minimumSizeHint().height()+3 + newHeight = self.connectionSettingsGroup.minimumSizeHint().height()+self.mediaplayerSettingsGroup.minimumSizeHint().height()+self.bottomButtonFrame.minimumSizeHint().height()+13 if self.error: newHeight += self.errorLabel.height() + 3 self.stackedFrame.setFixedHeight(newHeight) @@ -1340,6 +1353,7 @@ class ConfigDialog(QtWidgets.QDialog): self.tabListWidget.setCurrentRow(0) self.stackedFrame.setFixedHeight(self.stackedFrame.minimumSizeHint().height()) + self.showmoreCheckbox.toggled.connect(self.moreToggled) self.setLayout(self.mainLayout) From d04f9ada7e124ca22162cc5aa8c65c7aa4a9a583 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Wed, 1 May 2019 00:05:02 +0200 Subject: [PATCH 019/105] Add snapcraft support --- MANIFEST.in | 3 ++- setup.py | 11 +++++++---- snapcraft.yaml | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 snapcraft.yaml diff --git a/MANIFEST.in b/MANIFEST.in index f3809a6..29917cb 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,7 @@ include LICENSE +include syncplay/resources/*.desktop include syncplay/resources/*.png include syncplay/resources/*.mng include syncplay/resources/*.lua include syncplay/resources/*.rtf -include syncplay/resources/lua/intf/*.lua \ No newline at end of file +include syncplay/resources/lua/intf/*.lua diff --git a/setup.py b/setup.py index 91b2602..358e9ee 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -import distutils.command.install_scripts +import os import setuptools from syncplay import projectURL, version as syncplay_version @@ -9,8 +9,11 @@ def read(fname): with open(fname, 'r') as f: return f.read() -installRequirements = read('requirements.txt').splitlines() +\ - read('requirements_gui.txt').splitlines() +if os.getenv('SNAPCRAFT_PART_BUILD', None) is not None: + installRequirements = ["pyasn1"] + read('requirements.txt').splitlines() +else: + installRequirements = read('requirements.txt').splitlines() +\ + read('requirements_gui.txt').splitlines() setuptools.setup( name="syncplay", @@ -61,4 +64,4 @@ setuptools.setup( "Topic :: Internet", "Topic :: Multimedia :: Video" ], -) \ No newline at end of file +) diff --git a/snapcraft.yaml b/snapcraft.yaml new file mode 100644 index 0000000..b92af89 --- /dev/null +++ b/snapcraft.yaml @@ -0,0 +1,35 @@ +name: syncplay +summary: Syncplay +version: build +version-script: cat syncplay/__init__.py | awk '/version/ {gsub("\047", "", $3); print $NF}' +summary: Client/server to synchronize media playback on many computers +description: | + Syncplay synchronises the position and play state of multiple media players + so that the viewers can watch the same thing at the same time. This means that + when one person pauses/unpauses playback or seeks (jumps position) within their + media player then this will be replicated across all media players connected to + the same server and in the same 'room' (viewing session). When a new person + joins they will also be synchronised. Syncplay also includes text-based chat so + you can discuss a video as you watch it (or you could use third-party Voice over + IP software to talk over a video). + +confinement: classic +icon: syncplay/resources/syncplay.png +grade: stable + +parts: + syncplay: + plugin: python + source: . + stage-packages: + - python3-pyside + after: [desktop-qt4] + +apps: + syncplay: + command: bin/desktop-launch $SNAP/usr/bin/python3 $SNAP/bin/syncplay + desktop: lib/python3.5/site-packages/syncplay/resources/syncplay.desktop + + syncplay-server: + command: bin/syncplay-server + desktop: lib/python3.5/site-packages/syncplay/resources/syncplay-server.desktop From bfc524fa2c3ab2b74208149c59617d87b9711a81 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Wed, 1 May 2019 00:11:58 +0200 Subject: [PATCH 020/105] Travis: build matrix MacOS + Snap --- .travis.yml | 37 +++++++++++++++---------------------- bintray.json | 2 +- bintray_version.py | 6 ++++-- travis/linux-install.sh | 11 +++++++++++ travis/macos-deploy.sh | 5 +++++ travis/macos-install.sh | 15 +++++++++++++++ 6 files changed, 51 insertions(+), 25 deletions(-) create mode 100755 travis/linux-install.sh create mode 100755 travis/macos-deploy.sh create mode 100755 travis/macos-install.sh diff --git a/.travis.yml b/.travis.yml index cf4d283..d98e36b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,37 +1,30 @@ -language: objective-c -osx_image: xcode8.3 +matrix: + include: + - language: objective-c + osx_image: xcode8.3 + - language: bash + sudo: required + dist: xenial branches: only: - master script: -- python3 buildPy2app.py py2app - -before_install: -- brew update -- brew upgrade python -- which python3 -- python3 --version -- which pip3 -- pip3 --version -- curl -L https://raw.githubusercontent.com/Homebrew/homebrew-core/dd6c67c1ba664c8910fe96aeb58f9938d97d9a53/Formula/pyside.rb -o pyside.rb -- brew install ./pyside.rb -- python3 -c "from PySide2 import __version__; print(__version__)" -- python3 -c "from PySide2.QtCore import __version__; print(__version__)" -- pip3 install py2app -- python3 -c "from py2app.recipes import pyside2" +- if [ "$TRAVIS_OS_NAME" == "osx" ]; then python3 buildPy2app.py py2app ; fi +- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo snapcraft cleanbuild ; fi install: -- pip3 install twisted[tls] appnope requests certifi +- if [ "$TRAVIS_OS_NAME" == "osx" ]; then travis/macos-install.sh ; fi +- if [ "$TRAVIS_OS_NAME" == "linux" ]; then travis/linux-install.sh ; fi before_deploy: -- pip3 install dmgbuild -- mkdir dist_dmg -- mv syncplay/resources/macOS_readme.pdf syncplay/resources/.macOS_readme.pdf +- ls -al - export VER="$(cat syncplay/__init__.py | awk '/version/ {gsub("\047", "", $3); print $NF}')" -- dmgbuild -s appdmg.py "Syncplay" dist_dmg/Syncplay_${VER}.dmg - python3 bintray_version.py +- mkdir dist_bintray +- if [ "$TRAVIS_OS_NAME" == "osx" ]; then travis/macos-deploy.sh ; fi +- if [ "$TRAVIS_OS_NAME" == "linux" ]; then mv syncplay_build_amd64.snap dist_bintray/syncplay_${VER}_amd64.snap ; fi deploy: skip_cleanup: true diff --git a/bintray.json b/bintray.json index 5fb36fd..fb2f5c5 100644 --- a/bintray.json +++ b/bintray.json @@ -9,7 +9,7 @@ }, "files": [ { - "includePattern": "dist_dmg/(.*)", + "includePattern": "dist_bintray/(.*)", "uploadPattern": "$1", "matrixParams": { "override": 1 diff --git a/bintray_version.py b/bintray_version.py index 1acad6c..dd7ae29 100644 --- a/bintray_version.py +++ b/bintray_version.py @@ -3,10 +3,12 @@ import json from syncplay import version -f = open('bintray.json', 'r') +bintrayFileName = 'bintray.json' + +f = open(bintrayFileName, 'r') data = json.load(f) data['version']['name'] = 'v' + version -g = open('bintray.json', 'w') +g = open(bintrayFileName, 'w') json.dump(data, g, indent=4) diff --git a/travis/linux-install.sh b/travis/linux-install.sh new file mode 100755 index 0000000..f7c52de --- /dev/null +++ b/travis/linux-install.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +sudo groupadd --system lxd +sudo usermod -a -G lxd $USER +sudo apt-get -qq update +sudo apt-get -y install snapd +sudo snap install lxd +sudo lxd.migrate -yes +sudo lxd waitready +sudo lxd init --auto --storage-backend dir +sudo snap install snapcraft --classic diff --git a/travis/macos-deploy.sh b/travis/macos-deploy.sh new file mode 100755 index 0000000..08cb90a --- /dev/null +++ b/travis/macos-deploy.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +pip3 install dmgbuild +mv syncplay/resources/macOS_readme.pdf syncplay/resources/.macOS_readme.pdf +dmgbuild -s appdmg.py "Syncplay" dist_bintray/Syncplay_${VER}.dmg diff --git a/travis/macos-install.sh b/travis/macos-install.sh new file mode 100755 index 0000000..3ee4b12 --- /dev/null +++ b/travis/macos-install.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +brew update +brew upgrade python +which python3 +python3 --version +which pip3 +pip3 --version +curl -L https://raw.githubusercontent.com/Homebrew/homebrew-core/dd6c67c1ba664c8910fe96aeb58f9938d97d9a53/Formula/pyside.rb -o pyside.rb +brew install ./pyside.rb +python3 -c "from PySide2 import __version__; print(__version__)" +python3 -c "from PySide2.QtCore import __version__; print(__version__)" +pip3 install py2app +python3 -c "from py2app.recipes import pyside2" +pip3 install twisted[tls] appnope requests certifi From de194d92ca239dddecc019a9fde8e25407476478 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Sun, 5 May 2019 22:07:48 +0200 Subject: [PATCH 021/105] Travis: use pyside bottle from our tap --- travis/macos-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index 3ee4b12..78b6425 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -6,8 +6,7 @@ which python3 python3 --version which pip3 pip3 --version -curl -L https://raw.githubusercontent.com/Homebrew/homebrew-core/dd6c67c1ba664c8910fe96aeb58f9938d97d9a53/Formula/pyside.rb -o pyside.rb -brew install ./pyside.rb +brew install albertosottile/syncplay/pyside python3 -c "from PySide2 import __version__; print(__version__)" python3 -c "from PySide2.QtCore import __version__; print(__version__)" pip3 install py2app From cf35fd73fe46175ac26c27fefeae81e53c16d905 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Mon, 6 May 2019 17:21:52 +0200 Subject: [PATCH 022/105] Upgrade qt5reactor to version 0.5 --- syncplay/vendor/qt5reactor.py | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/syncplay/vendor/qt5reactor.py b/syncplay/vendor/qt5reactor.py index da82ccc..fc54a09 100755 --- a/syncplay/vendor/qt5reactor.py +++ b/syncplay/vendor/qt5reactor.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2001-2017 +# Copyright (c) 2001-2018 # Allen Short # Andy Gayton # Andrew Bennetts @@ -113,7 +113,6 @@ from twisted.internet.interfaces import IReactorFDSet from twisted.python import log, runtime from zope.interface import implementer - class TwistedSocketNotifier(QObject): """Connection between an fd event and reader/writer callbacks.""" @@ -123,7 +122,7 @@ class TwistedSocketNotifier(QObject): QObject.__init__(self, parent) self.reactor = reactor self.watcher = watcher - fd = self.watcher.fileno() + fd = watcher.fileno() self.notifier = QSocketNotifier(fd, socketType, parent) self.notifier.setEnabled(True) if socketType == QSocketNotifier.Read: @@ -251,10 +250,10 @@ class QtReactor(posixbase.PosixReactorBase): return self._removeAll(self._reads, self._writes) def getReaders(self): - return list(self._reads.keys()) + return self._reads.keys() def getWriters(self): - return list(self._writes.keys()) + return self._writes.keys() def callLater(self, howlong, *args, **kargs): rval = super(QtReactor, self).callLater(howlong, *args, **kargs) @@ -286,13 +285,10 @@ class QtReactor(posixbase.PosixReactorBase): delay = max(delay, 1) if not fromqt: self.qApp.processEvents(QEventLoop.AllEvents, delay * 1000) - t = self.timeout() - if t is None: - timeout = 0.01 - else: - timeout = min(t, 0.01) - self._timer.setInterval(timeout * 1000) - self._timer.start() + timeout = self.timeout() + if timeout is not None: + self._timer.setInterval(timeout * 1000) + self._timer.start() def runReturn(self, installSignalHandlers=True): self.startRunning(installSignalHandlers=installSignalHandlers) @@ -337,7 +333,7 @@ class QtEventReactor(QtReactor): del self._events[event] def doEvents(self): - handles = list(self._events.keys()) + handles = self._events.keys() if len(handles) > 0: val = None while val != WAIT_TIMEOUT: From fbe9f3a9ac63b09a790257fd1744ac9628198be8 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Mon, 6 May 2019 18:27:12 +0200 Subject: [PATCH 023/105] AppVeyor: upgrade PySide2 to 5.12.3 --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 3611be7..cc8673e 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -25,7 +25,7 @@ init: - curl -L https://bintray.com/alby128/py2exe/download_file?file_path=py2exe-0.9.3.0-cp36-none-win32.whl -o py2exe-0.9.3.0-cp36-none-win32.whl - pip install py2exe-0.9.3.0-cp36-none-win32.whl - del py2exe-0.9.3.0-cp36-none-win32.whl - - pip install shiboken2==5.12.0 PySide2==5.12.0 + - pip install shiboken2==5.12.3 PySide2==5.12.3 - pip freeze install: From 819e6b6cae4caff4273514b1c65f388ad1dfdcd1 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Mon, 6 May 2019 18:26:22 +0200 Subject: [PATCH 024/105] About dialog: attempt Hi-DPI scaling of the logo --- buildPy2exe.py | 3 ++- syncplay/resources/syncplayAbout.png | Bin 0 -> 8141 bytes syncplay/resources/syncplayAbout@2x.png | Bin 0 -> 21037 bytes syncplay/ui/gui.py | 5 +++-- 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 syncplay/resources/syncplayAbout.png create mode 100644 syncplay/resources/syncplayAbout@2x.png diff --git a/buildPy2exe.py b/buildPy2exe.py index d9a60d7..47c10b0 100755 --- a/buildPy2exe.py +++ b/buildPy2exe.py @@ -688,7 +688,8 @@ guiIcons = [ 'resources/shield_edit.png', 'resources/shield_add.png', 'resources/email_go.png', - 'resources/world_add.png', 'resources/film_add.png', 'resources/delete.png', 'resources/spinner.mng' + 'resources/world_add.png', 'resources/film_add.png', 'resources/delete.png', 'resources/spinner.mng', + 'resources/syncplayAbout.png', 'resources/syncplayAbout@2x.png' ] guiIcons = ['syncplay/' + s for s in guiIcons] diff --git a/syncplay/resources/syncplayAbout.png b/syncplay/resources/syncplayAbout.png new file mode 100644 index 0000000000000000000000000000000000000000..63c472ccdf98b7bdf8ad9a2ebe9e9120ecfb4fc1 GIT binary patch literal 8141 zcmaKRbyOSQ+AdHiUMO1JrC4w)1Sn3?V!@#hoFtH>xJ!#m3&o`rDaGAdthg3;cXyXd z&v$<3yMNqsXU)vs`(5wzyt-!gnhDiZSH#Dm#6dwp!BQGy`7aLqrQ+DuNq7iY-^|F;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vK|q=?5Rt-`aLOOy9*E2bVWDBVK%n0A3r z`jUy0eWd@J7+|*7;G|<6X5ce+x9k{CZ&^Q@{-G)eYOAU&h|2P^#qF)@;-$i>kk8j2 z6s2wnnF6YickL3cGo%k@w`c+J&b51?bi2Vo%-T3UsVXTmP0Y(rOc=%OLq_qbL8I`8 zmrAMU{6yM=b9*uL92b4gtYNGbgjd#|^tb+j$}>dG5R}C7d_q#n8Rn(~1!L1>$o!c- zI1Gj;N28L|6_KPlK1p7hU>YJW%JT#4GgXvh8VGS2J06I$AO&^?^Yw%AgtE`U7_(M6 z5j==kqx3{IZX1eWl!i^C7!jmG(l90_ZF9u3>2Th*1`3wR zHf!&$Qg+OubVwtjg`wH`Eq%P54GA9LZDID*c)C|A(X0RdzW@UOqS~&j400000 LNkvXXu0mjf2hw|@ literal 0 HcmV?d00001 diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 7776bac..57c78e2 100755 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -137,9 +137,10 @@ class AboutDialog(QtWidgets.QDialog): licenseLabel = QtWidgets.QLabel( "

Copyright © 2012–2019 Syncplay

" + getMessage("about-dialog-license-text") + "

") - aboutIconPixmap = QtGui.QPixmap(resourcespath + "syncplay.png") + aboutIcon = QtGui.QIcon() + aboutIcon.addFile(resourcespath + "syncplayAbout.png") aboutIconLabel = QtWidgets.QLabel() - aboutIconLabel.setPixmap(aboutIconPixmap.scaled(65, 65, Qt.KeepAspectRatio)) + aboutIconLabel.setPixmap(aboutIcon.pixmap(64, 64)) aboutLayout = QtWidgets.QGridLayout() aboutLayout.addWidget(aboutIconLabel, 0, 0, 3, 4, Qt.AlignHCenter) aboutLayout.addWidget(nameLabel, 3, 0, 1, 4) From 3a4cf41d6b008e40c1ff03b3a5e55835be14430f Mon Sep 17 00:00:00 2001 From: albertosottile Date: Mon, 6 May 2019 23:08:35 +0200 Subject: [PATCH 025/105] py2exe: include resources/*.png in the app bundle --- buildPy2exe.py | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/buildPy2exe.py b/buildPy2exe.py index 47c10b0..58cda51 100755 --- a/buildPy2exe.py +++ b/buildPy2exe.py @@ -15,6 +15,7 @@ import sys # import warnings # warnings.warn("You must build Syncplay with Python 2.7!") +from glob import glob import os import subprocess from string import Template @@ -666,37 +667,10 @@ class build_installer(py2exe): script.compile() print("*** DONE ***") -guiIcons = [ - 'resources/accept.png', 'resources/arrow_undo.png', 'resources/clock_go.png', - 'resources/control_pause_blue.png', 'resources/cross.png', 'resources/door_in.png', - 'resources/folder_explore.png', 'resources/help.png', 'resources/table_refresh.png', - 'resources/timeline_marker.png', 'resources/control_play_blue.png', - 'resources/mpc-hc.png', 'resources/mpc-hc64.png', 'resources/mplayer.png', - 'resources/mpc-be.png', - 'resources/mpv.png', 'resources/vlc.png', 'resources/house.png', 'resources/film_link.png', - 'resources/eye.png', 'resources/comments.png', 'resources/cog_delete.png', 'resources/chevrons_right.png', - 'resources/user_key.png', 'resources/lock.png', 'resources/key_go.png', 'resources/page_white_key.png', - 'resources/lock_green.png', 'resources/lock_green_dialog.png', - 'resources/tick.png', 'resources/lock_open.png', 'resources/empty_checkbox.png', 'resources/tick_checkbox.png', - 'resources/world_explore.png', 'resources/application_get.png', 'resources/cog.png', 'resources/arrow_switch.png', - 'resources/film_go.png', 'resources/world_go.png', 'resources/arrow_refresh.png', 'resources/bullet_right_grey.png', - 'resources/user_comment.png', - 'resources/error.png', - 'resources/film_folder_edit.png', - 'resources/film_edit.png', - 'resources/folder_film.png', - 'resources/shield_edit.png', - 'resources/shield_add.png', - 'resources/email_go.png', - 'resources/world_add.png', 'resources/film_add.png', 'resources/delete.png', 'resources/spinner.mng', - 'resources/syncplayAbout.png', 'resources/syncplayAbout@2x.png' -] - -guiIcons = ['syncplay/' + s for s in guiIcons] +guiIcons = glob('syncplay/resources/*.png') + ['syncplay/resources/spinner.mng'] resources = [ "syncplay/resources/icon.ico", - "syncplay/resources/syncplay.png", "syncplay/resources/syncplayintf.lua", "syncplay/resources/license.rtf", "syncplay/resources/third-party-notices.rtf" From 03263b3a4ca9e0d06cb1296a68343367ad69c2b3 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Thu, 9 May 2019 17:08:27 +0200 Subject: [PATCH 026/105] macOS: appearance fixes on the main dialog UI --- syncplay/constants.py | 4 ++++ syncplay/ui/gui.py | 36 +++++++++++++++++++++++++++++------- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/syncplay/constants.py b/syncplay/constants.py index 49c69d4..f2f6686 100755 --- a/syncplay/constants.py +++ b/syncplay/constants.py @@ -187,6 +187,10 @@ STYLE_NOFILEITEM_COLOR = 'blue' STYLE_NOTCONTROLLER_COLOR = 'grey' STYLE_UNTRUSTEDITEM_COLOR = 'purple' +# Style constants for macOS +STYLE_READY_PUSHBUTTON_MACOS = "QPushButton { text-align: left; padding: 10px 5px 10px 15px; margin: 0px 3px 0px 2px}" +STYLE_AUTO_PLAY_PUSHBUTTON_MACOS = "QPushButton { text-align: left; padding: 10px 5px 10px 15px; margin: 0px 0px 0px -4px}" + TLS_CERT_ROTATION_MAX_RETRIES = 10 USERLIST_GUI_USERNAME_OFFSET = 21 # Pixels diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 57c78e2..5d35f30 100755 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -1287,6 +1287,7 @@ class MainWindow(QtWidgets.QMainWindow): window.outputFrame = QtWidgets.QFrame() window.outputFrame.setLineWidth(0) window.outputFrame.setMidLineWidth(0) + if isMacOS(): window.outputLayout.setSpacing(8) window.outputLayout.setContentsMargins(0, 0, 0, 0) window.outputLayout.addWidget(window.outputlabel) window.outputLayout.addWidget(window.outputbox) @@ -1303,8 +1304,8 @@ class MainWindow(QtWidgets.QMainWindow): self.listTreeView.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows) self.listTreeView.customContextMenuRequested.connect(self.openRoomMenu) window.listlabel = QtWidgets.QLabel(getMessage("userlist-heading-label")) - window.listlabel.setMinimumHeight(27) if isMacOS: + window.listlabel.setMinimumHeight(21) window.sslButton = QtWidgets.QPushButton(QtGui.QPixmap(resourcespath + 'lock_green.png').scaled(14, 14),"") window.sslButton.setVisible(False) window.sslButton.setFixedHeight(21) @@ -1312,6 +1313,7 @@ class MainWindow(QtWidgets.QMainWindow): window.sslButton.setMinimumSize(21, 21) window.sslButton.setStyleSheet("QPushButton:!hover{border: 1px solid gray;} QPushButton:hover{border:2px solid black;}") else: + window.listlabel.setMinimumHeight(27) window.sslButton = QtWidgets.QPushButton(QtGui.QPixmap(resourcespath + 'lock_green.png'),"") window.sslButton.setVisible(False) window.sslButton.setFixedHeight(27) @@ -1323,6 +1325,7 @@ class MainWindow(QtWidgets.QMainWindow): window.listFrame.setMidLineWidth(0) window.listFrame.setSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) window.listLayout.setContentsMargins(0, 0, 0, 0) + if isMacOS(): window.listLayout.setSpacing(8) window.userlistLayout = QtWidgets.QGridLayout() window.userlistFrame = QtWidgets.QFrame() @@ -1334,6 +1337,7 @@ class MainWindow(QtWidgets.QMainWindow): window.userlistLayout.addWidget(window.listlabel, 0, 0, Qt.AlignLeft) window.userlistLayout.addWidget(window.sslButton, 0, 2, Qt.AlignRight) window.userlistLayout.addWidget(window.listTreeView, 1, 0, 1, 3) + if isMacOS(): window.userlistLayout.setContentsMargins(3, 0, 3, 0) window.listSplit = QtWidgets.QSplitter(Qt.Vertical, self) window.listSplit.addWidget(window.userlistFrame) @@ -1349,9 +1353,13 @@ class MainWindow(QtWidgets.QMainWindow): window.roomLayout = QtWidgets.QHBoxLayout() window.roomFrame = QtWidgets.QFrame() window.roomFrame.setLayout(self.roomLayout) - window.roomFrame.setContentsMargins(0, 0, 0, 0) window.roomFrame.setSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) - window.roomLayout.setContentsMargins(0, 0, 0, 0) + if isMacOS(): + window.roomLayout.setSpacing(8) + window.roomLayout.setContentsMargins(3, 0, 0, 0) + else: + window.roomFrame.setContentsMargins(0, 0, 0, 0) + window.roomLayout.setContentsMargins(0, 0, 0, 0) self.roomButton.setToolTip(getMessage("joinroom-tooltip")) window.roomLayout.addWidget(window.roomInput) window.roomLayout.addWidget(window.roomButton) @@ -1359,6 +1367,7 @@ class MainWindow(QtWidgets.QMainWindow): window.listLayout.addWidget(window.roomFrame, Qt.AlignRight) window.listFrame.setLayout(window.listLayout) + if isMacOS(): window.listFrame.setMinimumHeight(window.outputFrame.height()) window.topSplit.addWidget(window.outputFrame) window.topSplit.addWidget(window.listFrame) @@ -1372,6 +1381,7 @@ class MainWindow(QtWidgets.QMainWindow): window.bottomFrame = QtWidgets.QFrame() window.bottomFrame.setLayout(window.bottomLayout) window.bottomLayout.setContentsMargins(0, 0, 0, 0) + if isMacOS(): window.bottomLayout.setSpacing(0) self.addPlaybackLayout(window) @@ -1416,14 +1426,18 @@ class MainWindow(QtWidgets.QMainWindow): window.readyPushButton.setAutoExclusive(False) window.readyPushButton.toggled.connect(self.changeReadyState) window.readyPushButton.setFont(readyFont) - window.readyPushButton.setStyleSheet(constants.STYLE_READY_PUSHBUTTON) + if isMacOS(): + window.readyPushButton.setStyleSheet(constants.STYLE_READY_PUSHBUTTON_MACOS) + else: + window.readyPushButton.setStyleSheet(constants.STYLE_READY_PUSHBUTTON) window.readyPushButton.setToolTip(getMessage("ready-tooltip")) window.listLayout.addWidget(window.readyPushButton, Qt.AlignRight) + if isMacOS(): window.listLayout.setContentsMargins(0, 0, 0, 10) window.autoplayLayout = QtWidgets.QHBoxLayout() window.autoplayFrame = QtWidgets.QFrame() window.autoplayFrame.setVisible(False) - window.autoplayLayout.setContentsMargins(0, 0, 0, 0) + window.autoplayFrame.setLayout(window.autoplayLayout) window.autoplayPushButton = QtWidgets.QPushButton() autoPlayFont = QtGui.QFont() @@ -1433,8 +1447,16 @@ class MainWindow(QtWidgets.QMainWindow): window.autoplayPushButton.setAutoExclusive(False) window.autoplayPushButton.toggled.connect(self.changeAutoplayState) window.autoplayPushButton.setFont(autoPlayFont) - window.autoplayPushButton.setStyleSheet(constants.STYLE_AUTO_PLAY_PUSHBUTTON) - window.autoplayPushButton.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + if isMacOS(): + window.autoplayFrame.setMinimumWidth(window.listFrame.sizeHint().width()) + window.autoplayLayout.setSpacing(15) + window.autoplayLayout.setContentsMargins(0, 8, 3, 3) + window.autoplayPushButton.setStyleSheet(constants.STYLE_AUTO_PLAY_PUSHBUTTON_MACOS) + window.autoplayPushButton.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) + else: + window.autoplayLayout.setContentsMargins(0, 0, 0, 0) + window.autoplayPushButton.setStyleSheet(constants.STYLE_AUTO_PLAY_PUSHBUTTON) + window.autoplayPushButton.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) window.autoplayPushButton.setToolTip(getMessage("autoplay-tooltip")) window.autoplayLabel = QtWidgets.QLabel(getMessage("autoplay-minimum-label")) window.autoplayLabel.setSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) From 4ff359a8209872622e46c4af20a6badc21577373 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Fri, 10 May 2019 16:20:57 +0200 Subject: [PATCH 027/105] macOS: appearance fixes on the config dialog UI --- syncplay/ui/GuiConfiguration.py | 41 +++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/syncplay/ui/GuiConfiguration.py b/syncplay/ui/GuiConfiguration.py index 069f279..f10859c 100755 --- a/syncplay/ui/GuiConfiguration.py +++ b/syncplay/ui/GuiConfiguration.py @@ -117,6 +117,7 @@ class ConfigDialog(QtWidgets.QDialog): self.saveMoreState(True) self.tabListWidget.setCurrentRow(0) self.ensureTabListIsVisible() + if isMacOS(): self.mediaplayerSettingsGroup.setFixedHeight(self.mediaplayerSettingsGroup.minimumSizeHint().height()) self.stackedFrame.setFixedHeight(self.stackedFrame.minimumSizeHint().height()) else: self.tabListFrame.hide() @@ -134,12 +135,21 @@ class ConfigDialog(QtWidgets.QDialog): self.mediabrowseButton.show() self.saveMoreState(False) self.stackedLayout.setCurrentIndex(0) - newHeight = self.connectionSettingsGroup.minimumSizeHint().height() + self.mediaplayerSettingsGroup.minimumSizeHint().height() + self.bottomButtonFrame.minimumSizeHint().height() + 13 + if isMacOS(): + self.mediaplayerSettingsGroup.setFixedHeight(self.mediaplayerSettingsGroup.minimumSizeHint().height()) + newHeight = self.connectionSettingsGroup.minimumSizeHint().height()+self.mediaplayerSettingsGroup.minimumSizeHint().height()+self.bottomButtonFrame.minimumSizeHint().height()+50 + else: + newHeight = self.connectionSettingsGroup.minimumSizeHint().height()+self.mediaplayerSettingsGroup.minimumSizeHint().height()+self.bottomButtonFrame.minimumSizeHint().height()+13 if self.error: newHeight += self.errorLabel.height()+3 self.stackedFrame.setFixedHeight(newHeight) self.adjustSize() - self.setFixedSize(self.sizeHint()) + if isMacOS(): + newHeight = self.connectionSettingsGroup.minimumSizeHint().height()+self.mediaplayerSettingsGroup.minimumSizeHint().height()+self.bottomButtonFrame.minimumSizeHint().height()+50+16 + self.setFixedWidth(self.sizeHint().width()) + self.setFixedHeight(newHeight) + else: + self.setFixedSize(self.sizeHint()) self.moreToggling = False self.setFixedWidth(self.minimumSizeHint().width()) @@ -617,7 +627,10 @@ class ConfigDialog(QtWidgets.QDialog): self.connectionSettingsLayout.addWidget(self.defaultroomTextbox, 3, 1) self.connectionSettingsLayout.setSpacing(10) self.connectionSettingsGroup.setLayout(self.connectionSettingsLayout) - self.connectionSettingsGroup.setMaximumHeight(self.connectionSettingsGroup.minimumSizeHint().height()) + if isMacOS(): + self.connectionSettingsGroup.setFixedHeight(self.connectionSettingsGroup.minimumSizeHint().height()) + else: + self.connectionSettingsGroup.setMaximumHeight(self.connectionSettingsGroup.minimumSizeHint().height()) self.playerargsTextbox = QLineEdit("", self) self.playerargsTextbox.textEdited.connect(self.changedPlayerArgs) @@ -1170,11 +1183,17 @@ class ConfigDialog(QtWidgets.QDialog): self.bottomButtonLayout.addWidget(self.runButton) self.bottomButtonLayout.addWidget(self.storeAndRunButton) self.bottomButtonFrame.setLayout(self.bottomButtonLayout) - self.bottomButtonLayout.setContentsMargins(5, 0, 5, 0) + if isMacOS(): + self.bottomButtonLayout.setContentsMargins(15, 0, 15, 0) + else: + self.bottomButtonLayout.setContentsMargins(5, 0, 5, 0) self.mainLayout.addWidget(self.bottomButtonFrame, 1, 0, 1, 2) self.bottomCheckboxFrame = QtWidgets.QFrame() - self.bottomCheckboxFrame.setContentsMargins(0, 0, 0, 0) + if isMacOS(): + self.bottomCheckboxFrame.setContentsMargins(3, 0, 6, 0) + else: + self.bottomCheckboxFrame.setContentsMargins(0, 0, 0, 0) self.bottomCheckboxLayout = QtWidgets.QGridLayout() self.alwaysshowCheckbox = QCheckBox(getMessage("forceguiprompt-label")) @@ -1344,7 +1363,10 @@ class ConfigDialog(QtWidgets.QDialog): self.mediapathTextbox.show() self.mediapathLabel.show() self.mediabrowseButton.show() - newHeight = self.connectionSettingsGroup.minimumSizeHint().height()+self.mediaplayerSettingsGroup.minimumSizeHint().height()+self.bottomButtonFrame.minimumSizeHint().height()+13 + if isMacOS(): + newHeight = self.connectionSettingsGroup.minimumSizeHint().height()+self.mediaplayerSettingsGroup.minimumSizeHint().height()+self.bottomButtonFrame.minimumSizeHint().height()+50 + else: + newHeight = self.connectionSettingsGroup.minimumSizeHint().height()+self.mediaplayerSettingsGroup.minimumSizeHint().height()+self.bottomButtonFrame.minimumSizeHint().height()+13 if self.error: newHeight += self.errorLabel.height() + 3 self.stackedFrame.setFixedHeight(newHeight) @@ -1361,7 +1383,12 @@ class ConfigDialog(QtWidgets.QDialog): self.runButton.setFocus() else: self.storeAndRunButton.setFocus() - self.setFixedSize(self.sizeHint()) + if isMacOS(): + initialHeight = self.connectionSettingsGroup.minimumSizeHint().height()+self.mediaplayerSettingsGroup.minimumSizeHint().height()+self.bottomButtonFrame.minimumSizeHint().height()+50 + self.setFixedWidth(self.sizeHint().width()) + self.setFixedHeight(initialHeight) + else: + self.setFixedSize(self.sizeHint()) self.setAcceptDrops(True) if constants.SHOW_TOOLTIPS: From ff6bb74b498be1666baa93cafbcb3e1af08c0634 Mon Sep 17 00:00:00 2001 From: albertosottile Date: Fri, 10 May 2019 22:49:08 +0200 Subject: [PATCH 028/105] Use dictionaries to get constant values for different OS --- syncplay/constants.py | 50 +++++++++++++++++++++++++++-------------- syncplay/players/vlc.py | 5 +---- syncplay/ui/gui.py | 8 ++----- syncplay/utils.py | 7 +----- 4 files changed, 37 insertions(+), 33 deletions(-) diff --git a/syncplay/constants.py b/syncplay/constants.py index f2f6686..2453d50 100755 --- a/syncplay/constants.py +++ b/syncplay/constants.py @@ -1,4 +1,24 @@ # coding:utf8 +# code needed to get customized constants for different OS +import sys + +OS_WINDOWS = "win" +OS_LINUX = "linux" +OS_MACOS = "darwin" +OS_BSD = "freebsd" +OS_DRAGONFLY = "dragonfly" +OS_DEFAULT = "default" + +def getValueForOS(constantDict): + if sys.platform.startswith(OS_WINDOWS): + return constantDict[OS_WINDOWS] if OS_WINDOWS in constantDict else constantDict[OS_DEFAULT] + if sys.platform.startswith(OS_LINUX): + return constantDict[OS_LINUX] if OS_LINUX in constantDict else constantDict[OS_DEFAULT] + if sys.platform.startswith(OS_MACOS): + return constantDict[OS_MACOS] if OS_MACOS in constantDict else constantDict[OS_DEFAULT] + if OS_BSD in sys.platform or sys.platform.startswith(OS_DRAGONFLY): + return constantDict[OS_BSD] if OS_BSD in constantDict else constantDict[OS_DEFAULT] + # You might want to change these DEFAULT_PORT = 8999 OSD_DURATION = 3.0 @@ -62,9 +82,10 @@ PLAYLIST_MAX_CHARACTERS = 10000 PLAYLIST_MAX_ITEMS = 250 MAXIMUM_TAB_WIDTH = 350 TAB_PADDING = 30 -DEFAULT_WINDOWS_MONOSPACE_FONT = "Consolas" -DEFAULT_OSX_MONOSPACE_FONT = "Menlo" -FALLBACK_MONOSPACE_FONT = "Monospace" +MONOSPACE_FONT = getValueForOS({ + OS_DEFAULT: "Monospace", + OS_MACOS: "Menlo", + OS_WINDOWS: "Consolas"}) DEFAULT_CHAT_FONT_SIZE = 24 DEFAULT_CHAT_INPUT_FONT_COLOR = "#FFFF00" DEFAULT_CHAT_OUTPUT_FONT_COLOR = "#FFFF00" @@ -175,8 +196,12 @@ STYLE_SUBCHECKBOX = "QCheckBox, QLabel, QRadioButton {{ margin-left: 6px; paddin STYLE_SUBLABEL = "QCheckBox, QLabel {{ margin-left: 6px; padding-left: 16px; background:url('{}') left no-repeat }}" # Graphic path STYLE_ERRORLABEL = "QLabel { color : black; border-style: outset; border-width: 2px; border-radius: 7px; border-color: red; padding: 2px; background: #FFAAAA; }" STYLE_SUCCESSLABEL = "QLabel { color : black; border-style: outset; border-width: 2px; border-radius: 7px; border-color: green; padding: 2px; background: #AAFFAA; }" -STYLE_READY_PUSHBUTTON = "QPushButton { text-align: left; padding: 10px 5px 10px 5px;}" -STYLE_AUTO_PLAY_PUSHBUTTON = "QPushButton { text-align: left; padding: 5px 5px 5px 5px; }" +STYLE_READY_PUSHBUTTON = getValueForOS({ + OS_DEFAULT: "QPushButton { text-align: left; padding: 10px 5px 10px 5px;}", + OS_MACOS: "QPushButton { text-align: left; padding: 10px 5px 10px 15px; margin: 0px 3px 0px 2px}"}) +STYLE_AUTO_PLAY_PUSHBUTTON = getValueForOS({ + OS_DEFAULT: "QPushButton { text-align: left; padding: 5px 5px 5px 5px; }", + OS_MACOS: "QPushButton { text-align: left; padding: 10px 5px 10px 15px; margin: 0px 0px 0px -4px}"}) STYLE_NOTIFICATIONBOX = "Username { color: #367AA9; font-weight:bold; }" STYLE_CONTACT_INFO = "{}

" # Contact info message STYLE_USER_MESSAGE = "<{}> {}" @@ -187,10 +212,6 @@ STYLE_NOFILEITEM_COLOR = 'blue' STYLE_NOTCONTROLLER_COLOR = 'grey' STYLE_UNTRUSTEDITEM_COLOR = 'purple' -# Style constants for macOS -STYLE_READY_PUSHBUTTON_MACOS = "QPushButton { text-align: left; padding: 10px 5px 10px 15px; margin: 0px 3px 0px 2px}" -STYLE_AUTO_PLAY_PUSHBUTTON_MACOS = "QPushButton { text-align: left; padding: 10px 5px 10px 15px; margin: 0px 0px 0px -4px}" - TLS_CERT_ROTATION_MAX_RETRIES = 10 USERLIST_GUI_USERNAME_OFFSET = 21 # Pixels @@ -221,8 +242,9 @@ MPV_SYNCPLAYINTF_CONSTANTS_TO_SEND = [ MPV_SYNCPLAYINTF_LANGUAGE_TO_SEND = ["mpv-key-tab-hint", "mpv-key-hint", "alphakey-mode-warning-first-line", "alphakey-mode-warning-second-line"] VLC_SLAVE_ARGS = ['--extraintf=luaintf', '--lua-intf=syncplay', '--no-quiet', '--no-input-fast-seek', '--play-and-pause', '--start-time=0'] -VLC_SLAVE_MACOS_ARGS = ['--verbose=2', '--no-file-logging'] -VLC_SLAVE_NONMACOS_ARGS = ['--no-one-instance', '--no-one-instance-when-started-from-file'] +VLC_SLAVE_EXTRA_ARGS = getValueForOS({ + OS_DEFAULT: ['--no-one-instance', '--no-one-instance-when-started-from-file'], + OS_MACOS: ['--verbose=2', '--no-file-logging']}) MPV_SUPERSEDE_IF_DUPLICATE_COMMANDS = ["no-osd set time-pos ", "loadfile "] MPV_REMOVE_BOTH_IF_DUPLICATE_COMMANDS = ["cycle pause"] MPLAYER_ANSWER_REGEX = "^ANS_([a-zA-Z_-]+)=(.+)$|^(Exiting)\.\.\. \((.+)\)$" @@ -279,9 +301,3 @@ DEFAULT_TRUSTED_DOMAINS = ["youtube.com", "youtu.be"] TRUSTABLE_WEB_PROTOCOLS = ["http://www.", "https://www.", "http://", "https://"] PRIVATE_FILE_FIELDS = ["path"] - -OS_WINDOWS = "win" -OS_LINUX = "linux" -OS_MACOS = "darwin" -OS_BSD = "freebsd" -OS_DRAGONFLY = "dragonfly" diff --git a/syncplay/players/vlc.py b/syncplay/players/vlc.py index 2f7cf8c..c06bcf2 100755 --- a/syncplay/players/vlc.py +++ b/syncplay/players/vlc.py @@ -28,10 +28,7 @@ class VlcPlayer(BasePlayer): RE_ANSWER = re.compile(constants.VLC_ANSWER_REGEX) SLAVE_ARGS = constants.VLC_SLAVE_ARGS - if isMacOS(): - SLAVE_ARGS.extend(constants.VLC_SLAVE_MACOS_ARGS) - else: - SLAVE_ARGS.extend(constants.VLC_SLAVE_NONMACOS_ARGS) + SLAVE_ARGS.extend(constants.VLC_SLAVE_EXTRA_ARGS) vlcport = random.randrange(constants.VLC_MIN_PORT, constants.VLC_MAX_PORT) if (constants.VLC_MIN_PORT < constants.VLC_MAX_PORT) else constants.VLC_MIN_PORT def __init__(self, client, playerPath, filePath, args): diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 5d35f30..1f21f07 100755 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -1426,10 +1426,7 @@ class MainWindow(QtWidgets.QMainWindow): window.readyPushButton.setAutoExclusive(False) window.readyPushButton.toggled.connect(self.changeReadyState) window.readyPushButton.setFont(readyFont) - if isMacOS(): - window.readyPushButton.setStyleSheet(constants.STYLE_READY_PUSHBUTTON_MACOS) - else: - window.readyPushButton.setStyleSheet(constants.STYLE_READY_PUSHBUTTON) + window.readyPushButton.setStyleSheet(constants.STYLE_READY_PUSHBUTTON) window.readyPushButton.setToolTip(getMessage("ready-tooltip")) window.listLayout.addWidget(window.readyPushButton, Qt.AlignRight) if isMacOS(): window.listLayout.setContentsMargins(0, 0, 0, 10) @@ -1451,12 +1448,11 @@ class MainWindow(QtWidgets.QMainWindow): window.autoplayFrame.setMinimumWidth(window.listFrame.sizeHint().width()) window.autoplayLayout.setSpacing(15) window.autoplayLayout.setContentsMargins(0, 8, 3, 3) - window.autoplayPushButton.setStyleSheet(constants.STYLE_AUTO_PLAY_PUSHBUTTON_MACOS) window.autoplayPushButton.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) else: window.autoplayLayout.setContentsMargins(0, 0, 0, 0) - window.autoplayPushButton.setStyleSheet(constants.STYLE_AUTO_PLAY_PUSHBUTTON) window.autoplayPushButton.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + window.autoplayPushButton.setStyleSheet(constants.STYLE_AUTO_PLAY_PUSHBUTTON) window.autoplayPushButton.setToolTip(getMessage("autoplay-tooltip")) window.autoplayLabel = QtWidgets.QLabel(getMessage("autoplay-minimum-label")) window.autoplayLabel.setSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) diff --git a/syncplay/utils.py b/syncplay/utils.py index 6b49129..5a394d3 100755 --- a/syncplay/utils.py +++ b/syncplay/utils.py @@ -181,12 +181,7 @@ posixresourcespath = findWorkingDir().replace("\\", "/") + "/resources/" def getDefaultMonospaceFont(): - if platform.system() == "Windows": - return constants.DEFAULT_WINDOWS_MONOSPACE_FONT - elif platform.system() == "Darwin": - return constants.DEFAULT_OSX_MONOSPACE_FONT - else: - return constants.FALLBACK_MONOSPACE_FONT + return constants.MONOSPACE_FONT def limitedPowerset(s, minLength): From ce8884f4c736fcc9abe4f500913830e71237cf37 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Fri, 10 May 2019 23:55:48 +0200 Subject: [PATCH 029/105] macOS: fix selection highlight in MainWindow userList --- syncplay/constants.py | 4 +++- syncplay/ui/gui.py | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/syncplay/constants.py b/syncplay/constants.py index 2453d50..2ed523c 100755 --- a/syncplay/constants.py +++ b/syncplay/constants.py @@ -214,7 +214,9 @@ STYLE_UNTRUSTEDITEM_COLOR = 'purple' TLS_CERT_ROTATION_MAX_RETRIES = 10 -USERLIST_GUI_USERNAME_OFFSET = 21 # Pixels +USERLIST_GUI_USERNAME_OFFSET = getValueForOS({ + OS_DEFAULT: 21, + OS_MACOS: 26}) # Pixels USERLIST_GUI_USERNAME_COLUMN = 0 USERLIST_GUI_FILENAME_COLUMN = 3 diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 1f21f07..7683420 100755 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -71,6 +71,10 @@ class UserlistItemDelegate(QtWidgets.QStyledItemDelegate): crossIconQPixmap = QtGui.QPixmap(resourcespath + "cross.png") roomController = currentQAbstractItemModel.data(itemQModelIndex, Qt.UserRole + constants.USERITEM_CONTROLLER_ROLE) userReady = currentQAbstractItemModel.data(itemQModelIndex, Qt.UserRole + constants.USERITEM_READY_ROLE) + isUserRow = indexQModelIndex.parent() != indexQModelIndex.parent().parent() + if isUserRow and isMacOS(): + whiteRect = QtCore.QRect(0, optionQStyleOptionViewItem.rect.y(), optionQStyleOptionViewItem.rect.width(), optionQStyleOptionViewItem.rect.height()) + itemQPainter.fillRect(whiteRect, QtGui.QColor(Qt.white)) if roomController and not controlIconQPixmap.isNull(): itemQPainter.drawPixmap( @@ -89,7 +93,6 @@ class UserlistItemDelegate(QtWidgets.QStyledItemDelegate): (optionQStyleOptionViewItem.rect.x()-10), midY - 8, crossIconQPixmap.scaled(16, 16, Qt.KeepAspectRatio)) - isUserRow = indexQModelIndex.parent() != indexQModelIndex.parent().parent() if isUserRow: optionQStyleOptionViewItem.rect.setX(optionQStyleOptionViewItem.rect.x()+constants.USERLIST_GUI_USERNAME_OFFSET) if column == constants.USERLIST_GUI_FILENAME_COLUMN: From a2294d09165c9a43ddbc6824ef08f719057e6219 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Fri, 10 May 2019 23:57:52 +0200 Subject: [PATCH 030/105] Server EP: removed unnecessary 'import socket' --- syncplay/ep_server.py | 1 - 1 file changed, 1 deletion(-) diff --git a/syncplay/ep_server.py b/syncplay/ep_server.py index 7bb899e..22aec44 100644 --- a/syncplay/ep_server.py +++ b/syncplay/ep_server.py @@ -1,4 +1,3 @@ -import socket import sys from twisted.internet import reactor From b3545a35bb5f5398584afb1e4f4df6a6004c3460 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Sat, 11 May 2019 00:25:49 +0200 Subject: [PATCH 031/105] macOS: fix random password loaded in the GUI macOS puts a -psn_0_xxxxxx argument when running an app via GUI. This argument was interpreted as a password (-p) and overloaded the value stored in the settings. Catching the -psn argument explicitely should prevent this. See https://stackoverflow.com/questions/10242115/os-x-strange-psn-command-line-parameter-when-launched-from-finder for further information about this legacy argument. --- syncplay/ui/ConfigurationGetter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/syncplay/ui/ConfigurationGetter.py b/syncplay/ui/ConfigurationGetter.py index 2cbcaa6..720dfc0 100755 --- a/syncplay/ui/ConfigurationGetter.py +++ b/syncplay/ui/ConfigurationGetter.py @@ -490,6 +490,7 @@ class ConfigurationGetter(object): self._argparser.add_argument('-r', '--room', metavar='room', type=str, nargs='?', help=getMessage("room-argument")) self._argparser.add_argument('-p', '--password', metavar='password', type=str, nargs='?', help=getMessage("password-argument")) self._argparser.add_argument('--player-path', metavar='path', type=str, help=getMessage("player-path-argument")) + self._argparser.add_argument('-psn', metavar='blackhole', type=str, help=argparse.SUPPRESS) self._argparser.add_argument('--language', metavar='language', type=str, help=getMessage("language-argument")) self._argparser.add_argument('file', metavar='file', type=str, nargs='?', help=getMessage("file-argument")) self._argparser.add_argument('--clear-gui-data', action='store_true', help=getMessage("clear-gui-data-argument")) From 12fc04326a781227e31e21a391cabd22fa50e67b Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Mon, 13 May 2019 12:38:05 +0200 Subject: [PATCH 032/105] macOS: add localized Edit menu with dictation support and emoji picker Qt on macOS automatically adds these entries to the menubar of GUI apps, providing that such apps have an Edit menu at their startup. Hence, this commit contains the following changes (macOS only): - create the menubar in the first dialog shown by the app (GuiConfiguration) - create an Edit menu, populate it with Cut/Copy/Paste/Select all actions - connect system-wide shortcuts to these new actions - pass the menubar and the Edit menu to the MainWindow through config and through an added optional argument in getUI and GraphicalUI - populate the menubar created before and not a new menubar in MainWindow - provide localized strings for the entries in the Edit menu - add xx.lproj folders in Syncplay.app/Contents/Resources/ to allow automatic localization of the entries added by the OS Known issues: - automatically added entries will always be in the OS language - the Edit menu might retain the previous language after a language change in the app settings. Reboot the app solves the issue. - the automatically added entries might disappear if the app language does not match the OS language --- syncplay/clientManager.py | 2 +- syncplay/messages_de.py | 6 ++++++ syncplay/messages_en.py | 6 ++++++ syncplay/messages_es.py | 6 ++++++ syncplay/messages_it.py | 6 ++++++ syncplay/messages_ru.py | 7 +++++++ syncplay/ui/GuiConfiguration.py | 32 +++++++++++++++++++++++++++++++ syncplay/ui/__init__.py | 4 ++-- syncplay/ui/gui.py | 34 +++++++++++++++++++++++---------- travis/macos-deploy.sh | 4 ++++ 10 files changed, 94 insertions(+), 13 deletions(-) diff --git a/syncplay/clientManager.py b/syncplay/clientManager.py index bdc3412..c222133 100755 --- a/syncplay/clientManager.py +++ b/syncplay/clientManager.py @@ -8,7 +8,7 @@ class SyncplayClientManager(object): def run(self): config = ConfigurationGetter().getConfiguration() from syncplay.client import SyncplayClient # Imported later, so the proper reactor is installed - interface = ui.getUi(graphical=not config["noGui"]) + interface = ui.getUi(graphical=not config["noGui"], passedBar=config['menuBar']) syncplayClient = SyncplayClient(config["playerClass"], interface, config) if syncplayClient: interface.addClient(syncplayClient) diff --git a/syncplay/messages_de.py b/syncplay/messages_de.py index cf43fa4..070b7ca 100755 --- a/syncplay/messages_de.py +++ b/syncplay/messages_de.py @@ -304,6 +304,12 @@ de = { "settrusteddomains-menu-label": "Set &trusted domains", # TODO: Translate "addtrusteddomain-menu-label": "Add {} as trusted domain", # Domain # TODO: Translate + "edit-menu-label": "&Bearbeiten", + "cut-menu-label": "Aus&schneiden", + "copy-menu-label": "&Kopieren", + "paste-menu-label": "&Einsetzen", + "selectall-menu-label": "&Alles auswälhen", + "playback-menu-label": "&Wiedergabe", "help-menu-label": "&Hilfe", diff --git a/syncplay/messages_en.py b/syncplay/messages_en.py index 7beee10..1f02846 100755 --- a/syncplay/messages_en.py +++ b/syncplay/messages_en.py @@ -306,6 +306,12 @@ en = { "settrusteddomains-menu-label": "Set &trusted domains", "addtrusteddomain-menu-label": "Add {} as trusted domain", # Domain + "edit-menu-label": "&Edit", + "cut-menu-label": "Cu&t", + "copy-menu-label": "&Copy", + "paste-menu-label": "&Paste", + "selectall-menu-label": "&Select All", + "playback-menu-label": "&Playback", "help-menu-label": "&Help", diff --git a/syncplay/messages_es.py b/syncplay/messages_es.py index aa6f3d5..0ebd4cd 100644 --- a/syncplay/messages_es.py +++ b/syncplay/messages_es.py @@ -306,6 +306,12 @@ es = { "settrusteddomains-menu-label": "Es&tablecer dominios de confianza", "addtrusteddomain-menu-label": "Agregar {} como dominio de confianza", # Domain + "edit-menu-label": "&Edición", + "cut-menu-label": "Cor&tar", + "copy-menu-label": "&Copiar", + "paste-menu-label": "&Pegar", + "selectall-menu-label": "&Seleccionar todo", + "playback-menu-label": "Re&producción", "help-menu-label": "A&yuda", diff --git a/syncplay/messages_it.py b/syncplay/messages_it.py index 753f6ed..43809a9 100755 --- a/syncplay/messages_it.py +++ b/syncplay/messages_it.py @@ -306,6 +306,12 @@ it = { "settrusteddomains-menu-label": "Imposta &domini fidati", "addtrusteddomain-menu-label": "Aggiungi {} come dominio fidato", # Domain + "edit-menu-label": "&Modifica", + "cut-menu-label": "&Taglia", + "copy-menu-label": "&Copia", + "paste-menu-label": "&Incolla", + "selectall-menu-label": "&Seleziona tutto", + "playback-menu-label": "&Riproduzione", "help-menu-label": "&Aiuto", diff --git a/syncplay/messages_ru.py b/syncplay/messages_ru.py index cf7c155..2d9be9c 100755 --- a/syncplay/messages_ru.py +++ b/syncplay/messages_ru.py @@ -307,6 +307,13 @@ ru = { "identifyascontroller-menu-label": "&Войти как оператор комнаты", "settrusteddomains-menu-label": "Доверенные &сайты", + # Edit menu - TODO: check - these should match the values of macOS menubar + "edit-menu-label": "&Правка", + "cut-menu-label": "Bы&резать", + "copy-menu-label": "&Скопировать", + "paste-menu-label": "&Bставить", + "selectall-menu-label": "Bыбра&ть все", + "playback-menu-label": "&Управление", "help-menu-label": "&Помощь", diff --git a/syncplay/ui/GuiConfiguration.py b/syncplay/ui/GuiConfiguration.py index f10859c..d1ce71f 100755 --- a/syncplay/ui/GuiConfiguration.py +++ b/syncplay/ui/GuiConfiguration.py @@ -1294,6 +1294,30 @@ class ConfigDialog(QtWidgets.QDialog): self.serverpassTextbox.setReadOnly(False) self.serverpassTextbox.setText(self.storedPassword) + def createMenubar(self): + self.menuBar = QtWidgets.QMenuBar() + + # Edit menu + self.editMenu = QtWidgets.QMenu(getMessage("edit-menu-label"), self) + + self.cutAction = self.editMenu.addAction(getMessage("cut-menu-label")) + self.cutAction.setShortcuts(QtGui.QKeySequence.Cut) + + self.copyAction = self.editMenu.addAction(getMessage("copy-menu-label")) + self.copyAction.setShortcuts(QtGui.QKeySequence.Copy) + + self.pasteAction = self.editMenu.addAction(getMessage("paste-menu-label")) + self.pasteAction.setShortcuts(QtGui.QKeySequence.Paste) + + self.selectAction = self.editMenu.addAction(getMessage("selectall-menu-label")) + self.selectAction.setShortcuts(QtGui.QKeySequence.SelectAll) + + self.editMenu.addSeparator() + + self.menuBar.addMenu(self.editMenu) + + self.mainLayout.setMenuBar(self.menuBar) + def __init__(self, config, playerpaths, error, defaultConfig): self.config = config self.defaultConfig = defaultConfig @@ -1345,6 +1369,14 @@ class ConfigDialog(QtWidgets.QDialog): self.addMiscTab() self.tabList() + if isMacOS(): + self.createMenubar() + self.config['menuBar'] = dict() + self.config['menuBar']['bar'] = self.menuBar + self.config['menuBar']['editMenu'] = self.editMenu + else: + self.config['menuBar'] = None + self.mainLayout.addWidget(self.stackedFrame, 0, 1) self.addBottomLayout() self.updatePasswordVisibilty() diff --git a/syncplay/ui/__init__.py b/syncplay/ui/__init__.py index c61a305..f883ef5 100755 --- a/syncplay/ui/__init__.py +++ b/syncplay/ui/__init__.py @@ -12,9 +12,9 @@ except ImportError: from syncplay.ui.consoleUI import ConsoleUI -def getUi(graphical=True): +def getUi(graphical=True, passedBar=None): if graphical: - ui = GraphicalUI() + ui = GraphicalUI(passedBar=passedBar) else: ui = ConsoleUI() ui.setDaemon(True) diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 7683420..5f8b17c 100755 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -1511,9 +1511,15 @@ class MainWindow(QtWidgets.QMainWindow): window.playbackFrame.setMaximumWidth(window.playbackFrame.sizeHint().width()) window.outputLayout.addWidget(window.playbackFrame) - def addMenubar(self, window): - window.menuBar = QtWidgets.QMenuBar() + def loadMenubar(self, window, passedBar): + if passedBar is not None: + window.menuBar = passedBar['bar'] + window.editMenu = passedBar['editMenu'] + else: + window.menuBar = QtWidgets.QMenuBar() + window.editMenu = None + def populateMenubar(self, window): # File menu window.fileMenu = QtWidgets.QMenu(getMessage("file-menu-label"), self) @@ -1527,10 +1533,17 @@ class MainWindow(QtWidgets.QMainWindow): getMessage("setmediadirectories-menu-label")) window.openAction.triggered.connect(self.openSetMediaDirectoriesDialog) - window.exitAction = window.fileMenu.addAction(QtGui.QPixmap(resourcespath + 'cross.png'), - getMessage("exit-menu-label")) + window.exitAction = window.fileMenu.addAction(getMessage("exit-menu-label")) + if isMacOS(): + window.exitAction.setMenuRole(QtWidgets.QAction.QuitRole) + else: + window.exitAction.setIcon(QtGui.QPixmap(resourcespath + 'cross.png')) window.exitAction.triggered.connect(self.exitSyncplay) - window.menuBar.addMenu(window.fileMenu) + + if(window.editMenu is not None): + window.menuBar.insertMenu(window.editMenu.menuAction(), window.fileMenu) + else: + window.menuBar.addMenu(window.fileMenu) # Playback menu @@ -1607,11 +1620,11 @@ class MainWindow(QtWidgets.QMainWindow): getMessage("about-menu-label")) else: window.about = window.helpMenu.addAction("&About") + window.about.setMenuRole(QtWidgets.QAction.AboutRole) window.about.triggered.connect(self.openAbout) window.menuBar.addMenu(window.helpMenu) - if not isMacOS(): - window.mainLayout.setMenuBar(window.menuBar) + window.mainLayout.setMenuBar(window.menuBar) @needsClient def openSSLDetails(self): @@ -1887,7 +1900,7 @@ class MainWindow(QtWidgets.QMainWindow): settings.beginGroup("PublicServerList") self.publicServerList = settings.value("publicServers", None) - def __init__(self): + def __init__(self, passedBar=None): super(MainWindow, self).__init__() self.console = ConsoleInGUI() self.console.setDaemon(True) @@ -1905,11 +1918,12 @@ class MainWindow(QtWidgets.QMainWindow): self.mainLayout = QtWidgets.QVBoxLayout() self.addTopLayout(self) self.addBottomLayout(self) - self.addMenubar(self) + self.loadMenubar(self, passedBar) + self.populateMenubar(self) self.addMainFrame(self) self.loadSettings() self.setWindowIcon(QtGui.QPixmap(resourcespath + "syncplay.png")) - self.setWindowFlags(self.windowFlags() & Qt.WindowCloseButtonHint & Qt.AA_DontUseNativeMenuBar & Qt.WindowMinimizeButtonHint & ~Qt.WindowContextHelpButtonHint) + self.setWindowFlags(self.windowFlags() & Qt.WindowCloseButtonHint & Qt.WindowMinimizeButtonHint & ~Qt.WindowContextHelpButtonHint) self.show() self.setAcceptDrops(True) self.clearedPlaylistNote = False diff --git a/travis/macos-deploy.sh b/travis/macos-deploy.sh index 08cb90a..3fb21ab 100755 --- a/travis/macos-deploy.sh +++ b/travis/macos-deploy.sh @@ -1,5 +1,9 @@ #!/usr/bin/env bash +mkdir dist/Syncplay.app/Contents/Resources/German.lproj +mkdir dist/Syncplay.app/Contents/Resources/Italian.lproj +mkdir dist/Syncplay.app/Contents/Resources/ru.lproj +mkdir dist/Syncplay.app/Contents/Resources/Spanish.lproj pip3 install dmgbuild mv syncplay/resources/macOS_readme.pdf syncplay/resources/.macOS_readme.pdf dmgbuild -s appdmg.py "Syncplay" dist_bintray/Syncplay_${VER}.dmg From bc242c25658620e3429068b7f12482cbaf4ac022 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Tue, 14 May 2019 12:20:32 +0200 Subject: [PATCH 033/105] macOS: add support for Mojave Dark Mode This commit adds to our UI the support for macOS 10.14+ Dark Mode. Qt already adapts a large fraction of the color scheme, but some label colors had to be adjusted and were put in separate STYLE_DARK constants. To determine if the OS is set in Dark or Light Mode, we use a new dependency, included in the vendor folder: Darkdetect - license: BSD-3-Clause To allow the app bundle to use the Dark Mode APIs, a constant is added in the info.plist ('NSRequiresAquaSystemAppearance': False) --- buildPy2app.py | 3 +- syncplay/constants.py | 8 +++ syncplay/resources/third-party-notices.rtf | 29 ++++++++++ syncplay/ui/gui.py | 56 +++++++++++++------ syncplay/vendor/darkdetect/__init__.py | 18 ++++++ syncplay/vendor/darkdetect/_detect.py | 64 ++++++++++++++++++++++ syncplay/vendor/darkdetect/_dummy.py | 14 +++++ 7 files changed, 175 insertions(+), 17 deletions(-) create mode 100755 syncplay/vendor/darkdetect/__init__.py create mode 100755 syncplay/vendor/darkdetect/_detect.py create mode 100755 syncplay/vendor/darkdetect/_dummy.py diff --git a/buildPy2app.py b/buildPy2app.py index 68e6466..659e575 100755 --- a/buildPy2app.py +++ b/buildPy2app.py @@ -30,7 +30,8 @@ OPTIONS = { 'CFBundleShortVersionString': syncplay.version, 'CFBundleIdentifier': 'pl.syncplay.Syncplay', 'LSMinimumSystemVersion': '10.12.0', - 'NSHumanReadableCopyright': 'Copyright © 2019 Syncplay All Rights Reserved' + 'NSHumanReadableCopyright': 'Copyright © 2019 Syncplay All Rights Reserved', + 'NSRequiresAquaSystemAppearance': False, } } diff --git a/syncplay/constants.py b/syncplay/constants.py index 2ed523c..f200d9e 100755 --- a/syncplay/constants.py +++ b/syncplay/constants.py @@ -212,6 +212,14 @@ STYLE_NOFILEITEM_COLOR = 'blue' STYLE_NOTCONTROLLER_COLOR = 'grey' STYLE_UNTRUSTEDITEM_COLOR = 'purple' +STYLE_DARK_LINKS_COLOR = "a {color: #1A78D5; }" +STYLE_DARK_ABOUT_LINK_COLOR = "color: #1A78D5;" +STYLE_DARK_ERRORNOTIFICATION = "color: #E94F64;" +STYLE_DARK_DIFFERENTITEM_COLOR = '#E94F64' +STYLE_DARK_NOFILEITEM_COLOR = '#1A78D5' +STYLE_DARK_NOTCONTROLLER_COLOR = 'grey' +STYLE_DARK_UNTRUSTEDITEM_COLOR = '#882fbc' + TLS_CERT_ROTATION_MAX_RETRIES = 10 USERLIST_GUI_USERNAME_OFFSET = getValueForOS({ diff --git a/syncplay/resources/third-party-notices.rtf b/syncplay/resources/third-party-notices.rtf index 13d3355..207ed83 100644 --- a/syncplay/resources/third-party-notices.rtf +++ b/syncplay/resources/third-party-notices.rtf @@ -400,6 +400,35 @@ TIONS OF ANY KIND, either express or implied. See the License for the specific l uage governing permissions and limitations under the License.\ \ +\b Darkdetect +\b0 \ +\ +Copyright (c) 2019, Alberto Sottile\ +All rights reserved.\ +\ +Redistribution and use in source and binary forms, with or without\ +modification, are permitted provided that the following conditions are met:\ + * Redistributions of source code must retain the above copyright\ + notice, this list of conditions and the following disclaimer.\ + * Redistributions in binary form must reproduce the above copyright\ + notice, this list of conditions and the following disclaimer in the\ + documentation and/or other materials provided with the distribution.\ + * Neither the name of "darkdetect" nor the\ + names of its contributors may be used to endorse or promote products\ + derived from this software without specific prior written permission.\ +\ +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\ +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\ +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\ +DISCLAIMED. IN NO EVENT SHALL "Alberto Sottile" BE LIABLE FOR ANY\ +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\ +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\ +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\ +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\ +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\ +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\ +\ + \b Icons\ \ diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 5f8b17c..de2f6bb 100755 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -31,6 +31,11 @@ if isMacOS() and IsPySide: from Foundation import NSURL from Cocoa import NSString, NSUTF8StringEncoding lastCheckedForUpdates = None +from syncplay.vendor import darkdetect +if isMacOS(): + isDarkMode = darkdetect.isDark() +else: + isDarkMode = None class ConsoleInGUI(ConsoleUI): @@ -51,7 +56,8 @@ class ConsoleInGUI(ConsoleUI): class UserlistItemDelegate(QtWidgets.QStyledItemDelegate): - def __init__(self): + def __init__(self, view=None): + self.view = view QtWidgets.QStyledItemDelegate.__init__(self) def sizeHint(self, option, index): @@ -72,9 +78,10 @@ class UserlistItemDelegate(QtWidgets.QStyledItemDelegate): roomController = currentQAbstractItemModel.data(itemQModelIndex, Qt.UserRole + constants.USERITEM_CONTROLLER_ROLE) userReady = currentQAbstractItemModel.data(itemQModelIndex, Qt.UserRole + constants.USERITEM_READY_ROLE) isUserRow = indexQModelIndex.parent() != indexQModelIndex.parent().parent() + bkgColor = self.view.palette().color(QtGui.QPalette.Base) if isUserRow and isMacOS(): - whiteRect = QtCore.QRect(0, optionQStyleOptionViewItem.rect.y(), optionQStyleOptionViewItem.rect.width(), optionQStyleOptionViewItem.rect.height()) - itemQPainter.fillRect(whiteRect, QtGui.QColor(Qt.white)) + blankRect = QtCore.QRect(0, optionQStyleOptionViewItem.rect.y(), optionQStyleOptionViewItem.rect.width(), optionQStyleOptionViewItem.rect.height()) + itemQPainter.fillRect(blankRect, bkgColor) if roomController and not controlIconQPixmap.isNull(): itemQPainter.drawPixmap( @@ -130,7 +137,11 @@ class AboutDialog(QtWidgets.QDialog): self.setWindowIcon(QtGui.QPixmap(resourcespath + 'syncplay.png')) nameLabel = QtWidgets.QLabel("
Syncplay
") nameLabel.setFont(QtGui.QFont("Helvetica", 18)) - linkLabel = QtWidgets.QLabel("
syncplay.pl
") + linkLabel = QtWidgets.QLabel() + if isDarkMode: + linkLabel.setText(("
syncplay.pl
").format(constants.STYLE_DARK_ABOUT_LINK_COLOR)) + else: + linkLabel.setText("
syncplay.pl
") linkLabel.setOpenExternalLinks(True) versionExtString = version + revision versionLabel = QtWidgets.QLabel( @@ -324,11 +335,17 @@ class MainWindow(QtWidgets.QMainWindow): fileIsAvailable = self.selfWindow.isFileAvailable(itemFilename) fileIsUntrusted = self.selfWindow.isItemUntrusted(itemFilename) if fileIsUntrusted: - self.item(item).setForeground(QtGui.QBrush(QtGui.QColor(constants.STYLE_UNTRUSTEDITEM_COLOR))) + if isDarkMode: + self.item(item).setForeground(QtGui.QBrush(QtGui.QColor(constants.STYLE_DARK_UNTRUSTEDITEM_COLOR))) + else: + self.item(item).setForeground(QtGui.QBrush(QtGui.QColor(constants.STYLE_UNTRUSTEDITEM_COLOR))) elif fileIsAvailable: - self.item(item).setForeground(QtGui.QBrush(QtGui.QColor(QtGui.QPalette.ColorRole(QtGui.QPalette.Text)))) + self.item(item).setForeground(QtGui.QBrush(self.selfWindow.palette().color(QtGui.QPalette.Text))) else: - self.item(item).setForeground(QtGui.QBrush(QtGui.QColor(constants.STYLE_DIFFERENTITEM_COLOR))) + if isDarkMode: + self.item(item).setForeground(QtGui.QBrush(QtGui.QColor(constants.STYLE_DARK_DIFFERENTITEM_COLOR))) + else: + self.item(item).setForeground(QtGui.QBrush(QtGui.QColor(constants.STYLE_DIFFERENTITEM_COLOR))) self.selfWindow._syncplayClient.fileSwitch.setFilenameWatchlist(self.selfWindow.newWatchlist) self.forceUpdate() @@ -605,24 +622,28 @@ class MainWindow(QtWidgets.QMainWindow): sameDuration = sameFileduration(user.file['duration'], currentUser.file['duration']) underlinefont = QtGui.QFont() underlinefont.setUnderline(True) + differentItemColor = constants.STYLE_DARK_DIFFERENTITEM_COLOR if isDarkMode else constants.STYLE_DIFFERENTITEM_COLOR if sameRoom: if not sameName: - filenameitem.setForeground(QtGui.QBrush(QtGui.QColor(constants.STYLE_DIFFERENTITEM_COLOR))) + filenameitem.setForeground(QtGui.QBrush(QtGui.QColor(differentItemColor))) filenameitem.setFont(underlinefont) if not sameSize: if formatSize(user.file['size']) == formatSize(currentUser.file['size']): filesizeitem = QtGui.QStandardItem(formatSize(user.file['size'], precise=True)) filesizeitem.setFont(underlinefont) - filesizeitem.setForeground(QtGui.QBrush(QtGui.QColor(constants.STYLE_DIFFERENTITEM_COLOR))) + filesizeitem.setForeground(QtGui.QBrush(QtGui.QColor(differentItemColor))) if not sameDuration: - filedurationitem.setForeground(QtGui.QBrush(QtGui.QColor(constants.STYLE_DIFFERENTITEM_COLOR))) + filedurationitem.setForeground(QtGui.QBrush(QtGui.QColor(differentItemColor))) filedurationitem.setFont(underlinefont) else: filenameitem = QtGui.QStandardItem(getMessage("nofile-note")) filedurationitem = QtGui.QStandardItem("") filesizeitem = QtGui.QStandardItem("") if room == currentUser.room: - filenameitem.setForeground(QtGui.QBrush(QtGui.QColor(constants.STYLE_NOFILEITEM_COLOR))) + if isDarkMode: + filenameitem.setForeground(QtGui.QBrush(QtGui.QColor(constants.STYLE_DARK_NOFILEITEM_COLOR))) + else: + filenameitem.setForeground(QtGui.QBrush(QtGui.QColor(constants.STYLE_NOFILEITEM_COLOR))) font = QtGui.QFont() if currentUser.username == user.username: font.setWeight(QtGui.QFont.Bold) @@ -637,7 +658,7 @@ class MainWindow(QtWidgets.QMainWindow): roomitem.appendRow((useritem, filesizeitem, filedurationitem, filenameitem)) self.listTreeModel = self._usertreebuffer self.listTreeView.setModel(self.listTreeModel) - self.listTreeView.setItemDelegate(UserlistItemDelegate()) + self.listTreeView.setItemDelegate(UserlistItemDelegate(view=self.listTreeView)) self.listTreeView.setItemsExpandable(False) self.listTreeView.setRootIsDecorated(False) self.listTreeView.expandAll() @@ -849,7 +870,10 @@ class MainWindow(QtWidgets.QMainWindow): message = message.replace("&", "&").replace('"', """).replace("<", "<").replace(">", ">") message = message.replace("<a href="https://syncplay.pl/trouble">", '').replace("</a>", "") message = message.replace("\n", "
") - message = "".format(constants.STYLE_ERRORNOTIFICATION) + message + "" + if isDarkMode: + message = "".format(constants.STYLE_DARK_ERRORNOTIFICATION) + message + "" + else: + message = "".format(constants.STYLE_ERRORNOTIFICATION) + message + "" self.newMessage(time.strftime(constants.UI_TIME_FORMAT, time.localtime()) + message + "
") @needsClient @@ -1259,6 +1283,7 @@ class MainWindow(QtWidgets.QMainWindow): window.outputLayout = QtWidgets.QVBoxLayout() window.outputbox = QtWidgets.QTextBrowser() + if isDarkMode: window.outputbox.document().setDefaultStyleSheet(constants.STYLE_DARK_LINKS_COLOR); window.outputbox.setReadOnly(True) window.outputbox.setTextInteractionFlags(window.outputbox.textInteractionFlags() | Qt.TextSelectableByKeyboard) window.outputbox.setOpenExternalLinks(True) @@ -1266,7 +1291,8 @@ class MainWindow(QtWidgets.QMainWindow): window.outputbox.moveCursor(QtGui.QTextCursor.End) window.outputbox.insertHtml(constants.STYLE_CONTACT_INFO.format(getMessage("contact-label"))) window.outputbox.moveCursor(QtGui.QTextCursor.End) - window.outputbox.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn) + window.outputbox.setCursorWidth(0) + if not isMacOS(): window.outputbox.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn) window.outputlabel = QtWidgets.QLabel(getMessage("notifications-heading-label")) window.outputlabel.setMinimumHeight(27) @@ -1414,8 +1440,6 @@ class MainWindow(QtWidgets.QMainWindow): playlistItem = QtWidgets.QListWidgetItem(getMessage("playlist-instruction-item-message")) playlistItem.setFont(noteFont) window.playlist.addItem(playlistItem) - playlistItem.setFont(noteFont) - window.playlist.addItem(playlistItem) window.playlistLayout.addWidget(window.playlist) window.playlistLayout.setAlignment(Qt.AlignTop) window.playlistGroup.setLayout(window.playlistLayout) diff --git a/syncplay/vendor/darkdetect/__init__.py b/syncplay/vendor/darkdetect/__init__.py new file mode 100755 index 0000000..0537e58 --- /dev/null +++ b/syncplay/vendor/darkdetect/__init__.py @@ -0,0 +1,18 @@ +#----------------------------------------------------------------------------- +# Copyright (C) 2019 Alberto Sottile +# +# Distributed under the terms of the 3-clause BSD License. +#----------------------------------------------------------------------------- + +__version__ = '0.1.0' + +import sys +import platform +from distutils.version import LooseVersion as V + +if sys.platform != "darwin" or V(platform.mac_ver()[0]) < V("10.14"): + from ._dummy import * +else: + from ._detect import * + +del sys, platform, V \ No newline at end of file diff --git a/syncplay/vendor/darkdetect/_detect.py b/syncplay/vendor/darkdetect/_detect.py new file mode 100755 index 0000000..9a79f7c --- /dev/null +++ b/syncplay/vendor/darkdetect/_detect.py @@ -0,0 +1,64 @@ +#----------------------------------------------------------------------------- +# Copyright (C) 2019 Alberto Sottile +# +# Distributed under the terms of the 3-clause BSD License. +#----------------------------------------------------------------------------- + +import ctypes +import ctypes.util + +appkit = ctypes.cdll.LoadLibrary(ctypes.util.find_library('AppKit')) +objc = ctypes.cdll.LoadLibrary(ctypes.util.find_library('objc')) + +void_p = ctypes.c_void_p +ull = ctypes.c_uint64 + +objc.objc_getClass.restype = void_p +objc.sel_registerName.restype = void_p +objc.objc_msgSend.restype = void_p +objc.objc_msgSend.argtypes = [void_p, void_p] + +msg = objc.objc_msgSend + +def _utf8(s): + if not isinstance(s, bytes): + s = s.encode('utf8') + return s + +def n(name): + return objc.sel_registerName(_utf8(name)) + +def C(classname): + return objc.objc_getClass(_utf8(classname)) + +def theme(): + NSAutoreleasePool = objc.objc_getClass('NSAutoreleasePool') + pool = msg(NSAutoreleasePool, n('alloc')) + pool = msg(pool, n('init')) + + NSUserDefaults = C('NSUserDefaults') + stdUserDef = msg(NSUserDefaults, n('standardUserDefaults')) + + NSString = C('NSString') + + key = msg(NSString, n("stringWithUTF8String:"), _utf8('AppleInterfaceStyle')) + appearanceNS = msg(stdUserDef, n('stringForKey:'), void_p(key)) + appearanceC = msg(appearanceNS, n('UTF8String')) + + if appearanceC is not None: + out = ctypes.string_at(appearanceC) + else: + out = None + + msg(pool, n('release')) + + if out is not None: + return out.decode('utf-8') + else: + return 'Light' + +def isDark(): + return theme() == 'Dark' + +def isLight(): + return theme() == 'Light' diff --git a/syncplay/vendor/darkdetect/_dummy.py b/syncplay/vendor/darkdetect/_dummy.py new file mode 100755 index 0000000..1e99668 --- /dev/null +++ b/syncplay/vendor/darkdetect/_dummy.py @@ -0,0 +1,14 @@ +#----------------------------------------------------------------------------- +# Copyright (C) 2019 Alberto Sottile +# +# Distributed under the terms of the 3-clause BSD License. +#----------------------------------------------------------------------------- + +def theme(): + return None + +def isDark(): + return None + +def isLight(): + return None From 8f5b77c0bfed34003627c11bbc63a9b6ed1bc9b6 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Tue, 14 May 2019 15:42:05 +0200 Subject: [PATCH 034/105] Certificate dialog: Hi-DPI scaling of the padlock --- syncplay/resources/lock_green_dialog@2x.png | Bin 0 -> 1389 bytes syncplay/ui/gui.py | 5 +++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 syncplay/resources/lock_green_dialog@2x.png diff --git a/syncplay/resources/lock_green_dialog@2x.png b/syncplay/resources/lock_green_dialog@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..44788f14937988d0d2874523da0ea6184c960c0f GIT binary patch literal 1389 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H3?#oinD`S&F&8^|hH!9j++|9^)6456z+vkpZz>~{c?p;tldg#8JH$3nCAgV<@iLo*LY0U2ZF@;pvB>f#TUmA~Oy~02x53j6+eGN20U9+^i#!nTH~C4uhn!4@JO@ z%{&sGeK0EfaCG*es2s4a?1Pb6ha)o&0@VPG1=*enR1f4roB@S2Niy>OKvSHbjxO$J&G6akYU6OfDr*$Wp3vOx%}9ia@W z04N1@6;v5SF~S*Oy%0eVdG+O53t$wsmIV0)GcYnUv#_$Uad7hR@(T)!OGrt}$tfr* zscL9yX=@uA8k<>IS=-noEMMfnir(|U378IA1R#w(FxAjh(I(_<# z*>mR2U$AKLl4Z-6uUN5u!^TZpw(i(<;Ly>Nr_Y={f8p|#t2b}me)#Cgljkp9zj^!q z!^h8GzJB}h>-V3(|GfT`?qgtJ+T-cs7*cWT?TpvaLXINsjG`ZBWtN!g2hNOAxi@)5 z$eJ@;-B(N;bsRm2JBT-Y)<0n}W<}jdB6`^QT_K|Fm2F;k9=axBmWU$@}Hr{A;86CHo(I}|_vAjZ6B)@`rd5%s@? z=B!w6@u<0aTZ*{Qi?)8_q!!6WpY0bIf)-rsG0b9f(3~i^<M_Eya{WWm=-Sx z>JMDQp0JpSNxNj>j)#%A9-C}Gbbmjijc0q|2IdCdJ50_cGhM}sCaSgXU_D@Z<9uy% zM^XF{qY_DT?pMoB_Dl|D2=Uys(KD}HOKz9PgkIiDYubYkxQl;Wnf&#>O8=_5SZxR*(z z0SPIDCuHa4owjN`Q*bwbNuEV=ufv{?99ccliW}leeL~kpD_rnQp8JY*nS%M!m;`~M z=2NV*6tAy|Qi$f;`Dx87&N*#&G@nKnFc*bS<+f?NxVbYXlYfOm$iF zL(FH2tYfP1wHn^(=VgqZPhY!>|Bg+{J0TGVMlfppAExl>iT}Mv{30kWD_F!@$LRS+ W&uQ<+k2`@Gi^0>?&t;ucLK6V>rHC>B literal 0 HcmV?d00001 diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index de2f6bb..d239507 100755 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -207,9 +207,10 @@ class CertificateDialog(QtWidgets.QDialog): descLabel.setFont(QtGui.QFont("Helvetica", 12)) connDataLabel.setFont(QtGui.QFont("Helvetica", 12)) certDataLabel.setFont(QtGui.QFont("Helvetica", 12)) - lockIconPixmap = QtGui.QPixmap(resourcespath + "lock_green_dialog.png") + lockIcon = QtGui.QIcon() + lockIcon.addFile(resourcespath + "lock_green_dialog.png") lockIconLabel = QtWidgets.QLabel() - lockIconLabel.setPixmap(lockIconPixmap.scaled(64, 64, Qt.KeepAspectRatio)) + lockIconLabel.setPixmap(lockIcon.pixmap(64, 64)) certLayout = QtWidgets.QGridLayout() certLayout.addWidget(lockIconLabel, 1, 0, 3, 1, Qt.AlignLeft | Qt.AlignTop) certLayout.addWidget(statusLabel, 0, 1, 1, 3) From f6414c39cc595876ca2f18e1a5c87181587377ca Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Tue, 14 May 2019 16:45:49 +0200 Subject: [PATCH 035/105] Linux: fix selection highlight in MainWindow userList Apparently, this fix is required also on Linux. The same fix used for macOS is used, with automatic detection of the background color. --- syncplay/ui/gui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index d239507..f155c2d 100755 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -79,7 +79,7 @@ class UserlistItemDelegate(QtWidgets.QStyledItemDelegate): userReady = currentQAbstractItemModel.data(itemQModelIndex, Qt.UserRole + constants.USERITEM_READY_ROLE) isUserRow = indexQModelIndex.parent() != indexQModelIndex.parent().parent() bkgColor = self.view.palette().color(QtGui.QPalette.Base) - if isUserRow and isMacOS(): + if isUserRow and (isMacOS() or isLinux()): blankRect = QtCore.QRect(0, optionQStyleOptionViewItem.rect.y(), optionQStyleOptionViewItem.rect.width(), optionQStyleOptionViewItem.rect.height()) itemQPainter.fillRect(blankRect, bkgColor) From 2ecd9e7877e0414f9232c62cf5d344d2702fa0b4 Mon Sep 17 00:00:00 2001 From: et0h Date: Sun, 19 May 2019 18:29:00 +0100 Subject: [PATCH 036/105] Prevent long player paths from making GuiConfig window too wide --- syncplay/constants.py | 1 + syncplay/ui/GuiConfiguration.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/syncplay/constants.py b/syncplay/constants.py index f200d9e..303df49 100755 --- a/syncplay/constants.py +++ b/syncplay/constants.py @@ -44,6 +44,7 @@ FALLBACK_PUBLIC_SYNCPLAY_SERVERS = [ ['syncplay.pl:8999 (France)', 'syncplay.pl:8999']] PLAYLIST_LOAD_NEXT_FILE_MINIMUM_LENGTH = 10 # Seconds PLAYLIST_LOAD_NEXT_FILE_TIME_FROM_END_THRESHOLD = 5 # Seconds (only triggered if file is paused, e.g. due to EOF) +EXECUTABLE_COMBOBOX_MINIMUM_LENGTH = 30 # Minimum number of characters that the combobox will make visible # Overriden by config SHOW_OSD = True # Sends Syncplay messages to media player OSD diff --git a/syncplay/ui/GuiConfiguration.py b/syncplay/ui/GuiConfiguration.py index d1ce71f..fddf2f5 100755 --- a/syncplay/ui/GuiConfiguration.py +++ b/syncplay/ui/GuiConfiguration.py @@ -657,6 +657,8 @@ class ConfigDialog(QtWidgets.QDialog): self.executablepathLabel.setObjectName("executable-path") self.executablepathCombobox.setObjectName("executable-path") + self.executablepathCombobox.setMinimumContentsLength(constants.EXECUTABLE_COMBOBOX_MINIMUM_LENGTH) + self.executablepathCombobox.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToMinimumContentsLengthWithIcon) self.mediapathLabel.setObjectName("media-path") self.mediapathTextbox.setObjectName(constants.LOAD_SAVE_MANUALLY_MARKER + "media-path") self.playerargsLabel.setObjectName("player-arguments") From f3b04ad39d19e3cf3e1dcf3c31f1c6c7a0651457 Mon Sep 17 00:00:00 2001 From: et0h Date: Sun, 19 May 2019 18:58:24 +0100 Subject: [PATCH 037/105] Don't make space for icon within player path combobox --- syncplay/ui/GuiConfiguration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncplay/ui/GuiConfiguration.py b/syncplay/ui/GuiConfiguration.py index fddf2f5..5030333 100755 --- a/syncplay/ui/GuiConfiguration.py +++ b/syncplay/ui/GuiConfiguration.py @@ -658,7 +658,7 @@ class ConfigDialog(QtWidgets.QDialog): self.executablepathLabel.setObjectName("executable-path") self.executablepathCombobox.setObjectName("executable-path") self.executablepathCombobox.setMinimumContentsLength(constants.EXECUTABLE_COMBOBOX_MINIMUM_LENGTH) - self.executablepathCombobox.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToMinimumContentsLengthWithIcon) + self.executablepathCombobox.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToMinimumContentsLength) self.mediapathLabel.setObjectName("media-path") self.mediapathTextbox.setObjectName(constants.LOAD_SAVE_MANUALLY_MARKER + "media-path") self.playerargsLabel.setObjectName("player-arguments") From 7862c27d541f46964f7c20184aca90492393de40 Mon Sep 17 00:00:00 2001 From: et0h Date: Sun, 19 May 2019 20:59:04 +0100 Subject: [PATCH 038/105] Initial support for VLC Portable (#235) --- syncplay/players/vlc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/syncplay/players/vlc.py b/syncplay/players/vlc.py index c06bcf2..4f117e3 100755 --- a/syncplay/players/vlc.py +++ b/syncplay/players/vlc.py @@ -351,6 +351,9 @@ class VlcPlayer(BasePlayer): # This should also work for all the other BSDs, such as OpenBSD or DragonFly. playerController.vlcIntfPath = "/usr/local/lib/vlc/lua/intf/" playerController.vlcIntfUserPath = os.path.join(os.getenv('HOME', '.'), ".local/share/vlc/lua/intf/") + elif "vlcportable.exe" in playerPath.lower(): + playerController.vlcIntfPath = os.path.dirname(playerPath).replace("\\", "/") + "/App/vlc/lua/intf/" + playerController.vlcIntfUserPath = playerController.vlcIntfPath else: playerController.vlcIntfPath = os.path.dirname(playerPath).replace("\\", "/") + "/lua/intf/" playerController.vlcIntfUserPath = os.path.join(os.getenv('APPDATA', '.'), "VLC\\lua\\intf\\") From a9172f9fa66a8eff488a76b209015411ef641ddb Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Mon, 20 May 2019 11:26:35 +0200 Subject: [PATCH 039/105] Support for Snap VLC on Linux Add the snap VLC path to the discovery list and automatically copy our lua script in the correct path for snap installations. Fixes: #222 --- syncplay/constants.py | 3 ++- syncplay/players/vlc.py | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/syncplay/constants.py b/syncplay/constants.py index 303df49..7d63c03 100755 --- a/syncplay/constants.py +++ b/syncplay/constants.py @@ -162,7 +162,8 @@ VLC_PATHS = [ "/usr/bin/vlc-wrapper", "/Applications/VLC.app/Contents/MacOS/VLC", "/usr/local/bin/vlc", - "/usr/local/bin/vlc-wrapper" + "/usr/local/bin/vlc-wrapper", + "/snap/bin/vlc" ] VLC_ICONPATH = "vlc.png" diff --git a/syncplay/players/vlc.py b/syncplay/players/vlc.py index 4f117e3..712387c 100755 --- a/syncplay/players/vlc.py +++ b/syncplay/players/vlc.py @@ -340,8 +340,12 @@ class VlcPlayer(BasePlayer): else: call.append(self.__playerController.getMRL(filePath)) if isLinux(): - playerController.vlcIntfPath = "/usr/lib/vlc/lua/intf/" - playerController.vlcIntfUserPath = os.path.join(os.getenv('HOME', '.'), ".local/share/vlc/lua/intf/") + if 'snap' in playerPath: + playerController.vlcIntfPath = '/snap/vlc/current/usr/lib/vlc/lua/intf/' + playerController.vlcIntfUserPath = os.path.join(os.getenv('HOME', '.'), "snap/vlc/current/.local/share/vlc/lua/intf/") + else: + playerController.vlcIntfPath = "/usr/lib/vlc/lua/intf/" + playerController.vlcIntfUserPath = os.path.join(os.getenv('HOME', '.'), ".local/share/vlc/lua/intf/") elif isMacOS(): playerController.vlcIntfPath = "/Applications/VLC.app/Contents/MacOS/share/lua/intf/" playerController.vlcIntfUserPath = os.path.join( From 0279702f73e8e0b7e4ba5dfa1d623c924efa419c Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Fri, 24 May 2019 17:20:02 +0200 Subject: [PATCH 040/105] Do not throw a KeyError when GUI is not available --- syncplay/clientManager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/syncplay/clientManager.py b/syncplay/clientManager.py index c222133..b2caafa 100755 --- a/syncplay/clientManager.py +++ b/syncplay/clientManager.py @@ -8,7 +8,8 @@ class SyncplayClientManager(object): def run(self): config = ConfigurationGetter().getConfiguration() from syncplay.client import SyncplayClient # Imported later, so the proper reactor is installed - interface = ui.getUi(graphical=not config["noGui"], passedBar=config['menuBar']) + menuBar = config['menuBar'] if 'menuBar' in config else None + interface = ui.getUi(graphical=not config["noGui"], passedBar=menuBar) syncplayClient = SyncplayClient(config["playerClass"], interface, config) if syncplayClient: interface.addClient(syncplayClient) From 7788e533eb486106e301f66a36e6fc7e24bd1307 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Wed, 22 May 2019 09:56:43 +0200 Subject: [PATCH 041/105] vendor: upgrade Darkdetect to 0.1.1 --- syncplay/vendor/darkdetect/__init__.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/syncplay/vendor/darkdetect/__init__.py b/syncplay/vendor/darkdetect/__init__.py index 0537e58..4cce200 100755 --- a/syncplay/vendor/darkdetect/__init__.py +++ b/syncplay/vendor/darkdetect/__init__.py @@ -4,15 +4,19 @@ # Distributed under the terms of the 3-clause BSD License. #----------------------------------------------------------------------------- -__version__ = '0.1.0' +__version__ = '0.1.1' import sys import platform -from distutils.version import LooseVersion as V -if sys.platform != "darwin" or V(platform.mac_ver()[0]) < V("10.14"): +if sys.platform != "darwin": from ._dummy import * else: - from ._detect import * + from distutils.version import LooseVersion as V + if V(platform.mac_ver()[0]) < V("10.14"): + from ._dummy import * + else: + from ._detect import * + del V -del sys, platform, V \ No newline at end of file +del sys, platform \ No newline at end of file From f90a674707b282920caaa2d0032614f885bf6481 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Mon, 20 May 2019 20:15:33 +0200 Subject: [PATCH 042/105] Add AppImage support --- .travis.yml | 15 ++++- travis/appimage-script.sh | 59 +++++++++++++++++++ ...{linux-install.sh => snapcraft-install.sh} | 0 3 files changed, 71 insertions(+), 3 deletions(-) create mode 100755 travis/appimage-script.sh rename travis/{linux-install.sh => snapcraft-install.sh} (100%) diff --git a/.travis.yml b/.travis.yml index d98e36b..1897e7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,12 @@ matrix: - language: bash sudo: required dist: xenial + env: BUILD_DESTINATION=snapcraft + - language: python + sudo: required + dist: xenial + python: 3.6 + env: BUILD_DESTINATION=appimage branches: only: @@ -12,11 +18,13 @@ branches: script: - if [ "$TRAVIS_OS_NAME" == "osx" ]; then python3 buildPy2app.py py2app ; fi -- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo snapcraft cleanbuild ; fi +- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_DESTINATION" == "snapcraft" ]; then sudo snapcraft cleanbuild ; fi +- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_DESTINATION" == "appimage" ]; then travis/appimage-script.sh ; fi install: - if [ "$TRAVIS_OS_NAME" == "osx" ]; then travis/macos-install.sh ; fi -- if [ "$TRAVIS_OS_NAME" == "linux" ]; then travis/linux-install.sh ; fi +- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_DESTINATION" == "snapcraft" ]; then travis/snapcraft-install.sh ; fi +- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_DESTINATION" == "appimage" ]; then ls -al ; fi before_deploy: - ls -al @@ -24,7 +32,8 @@ before_deploy: - python3 bintray_version.py - mkdir dist_bintray - if [ "$TRAVIS_OS_NAME" == "osx" ]; then travis/macos-deploy.sh ; fi -- if [ "$TRAVIS_OS_NAME" == "linux" ]; then mv syncplay_build_amd64.snap dist_bintray/syncplay_${VER}_amd64.snap ; fi +- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_DESTINATION" == "snapcraft" ]; then mv syncplay_build_amd64.snap dist_bintray/syncplay_${VER}_amd64.snap ; fi +- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_DESTINATION" == "appimage" ]; then mv Syncplay*.AppImage dist_bintray/ ; fi deploy: skip_cleanup: true diff --git a/travis/appimage-script.sh b/travis/appimage-script.sh new file mode 100755 index 0000000..fa4dafa --- /dev/null +++ b/travis/appimage-script.sh @@ -0,0 +1,59 @@ +#! /bin/bash + +set -x +set -e + +# use RAM disk if possible +if [ "$CI" == "" ] && [ -d /dev/shm ]; then + TEMP_BASE=/dev/shm +else + TEMP_BASE=/tmp +fi + +BUILD_DIR=$(mktemp -d -p "$TEMP_BASE" appimagelint-build-XXXXXX) + +cleanup () { + if [ -d "$BUILD_DIR" ]; then + rm -rf "$BUILD_DIR" + fi +} + +trap cleanup EXIT + +# store repo root as variable +REPO_ROOT=$(readlink -f $(dirname $(dirname "$0"))) +#REPO_ROOT="." +OLD_CWD=$(readlink -f .) + +pushd "$BUILD_DIR" + +wget https://github.com/TheAssassin/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage +wget https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-conda/master/linuxdeploy-plugin-conda.sh + +chmod +x linuxdeploy*.AppImage +chmod +x linuxdeploy*.sh + +# set up custom AppRun script +cat > AppRun.sh <<\EAT +#! /bin/sh +# make sure to set APPDIR when run directly from the AppDir +if [ -z $APPDIR ]; then APPDIR=$(readlink -f $(dirname "$0")); fi +export LD_LIBRARY_PATH="$APPDIR"/usr/lib +export PATH="$PATH":"$APPDIR"/usr/bin + +exec "$APPDIR"/usr/bin/python "$APPDIR"/usr/bin/syncplay "$@" +EAT +chmod +x AppRun.sh + +#export CONDA_PACKAGES="Pillow" +export PIP_REQUIREMENTS="." +export PIP_WORKDIR="$REPO_ROOT" +export VERSION="$(cat $REPO_ROOT/syncplay/__init__.py | awk '/version/ {gsub("\047", "", $3); print $NF}')" +export OUTPUT=Syncplay-$VERSION-x86_64.AppImage + +./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin conda \ + -e $(which readelf) \ + -i "$REPO_ROOT"/syncplay/resources/syncplay.png -d "$REPO_ROOT"/syncplay/resources/syncplay.desktop \ + --output appimage --custom-apprun AppRun.sh + +mv Syncplay*.AppImage "$OLD_CWD" \ No newline at end of file diff --git a/travis/linux-install.sh b/travis/snapcraft-install.sh similarity index 100% rename from travis/linux-install.sh rename to travis/snapcraft-install.sh From fd6a082a0bb725e6af192a38fbec3b33d4d03a9f Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Wed, 22 May 2019 10:51:21 +0200 Subject: [PATCH 043/105] AppImage: add appimagelint test --- .travis.yml | 2 +- travis/appimage-deploy.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100755 travis/appimage-deploy.sh diff --git a/.travis.yml b/.travis.yml index 1897e7c..c571631 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ before_deploy: - mkdir dist_bintray - if [ "$TRAVIS_OS_NAME" == "osx" ]; then travis/macos-deploy.sh ; fi - if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_DESTINATION" == "snapcraft" ]; then mv syncplay_build_amd64.snap dist_bintray/syncplay_${VER}_amd64.snap ; fi -- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_DESTINATION" == "appimage" ]; then mv Syncplay*.AppImage dist_bintray/ ; fi +- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_DESTINATION" == "appimage" ]; then travis/appimage-deploy.sh ; fi deploy: skip_cleanup: true diff --git a/travis/appimage-deploy.sh b/travis/appimage-deploy.sh new file mode 100755 index 0000000..1293922 --- /dev/null +++ b/travis/appimage-deploy.sh @@ -0,0 +1,6 @@ +#! /bin/bash + +wget https://github.com/TheAssassin/appimagelint/releases/download/continuous/appimagelint-x86_64.AppImage +chmod a+x appimagelint-x86_64.AppImage +./appimagelint-x86_64.AppImage Syncplay*.AppImage +mv Syncplay*.AppImage dist_bintray/ From c6f206f9767c33c2400a96de0d8d0a0fea914024 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Thu, 23 May 2019 00:17:02 +0200 Subject: [PATCH 044/105] AppImage: add Appstream metadata file --- travis/appimage-script.sh | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/travis/appimage-script.sh b/travis/appimage-script.sh index fa4dafa..252b8de 100755 --- a/travis/appimage-script.sh +++ b/travis/appimage-script.sh @@ -1,5 +1,8 @@ #! /bin/bash +# Copyright (C) 2019 Syncplay +# Licensed under the MIT license - http://opensource.org/licenses/MIT + set -x set -e @@ -45,6 +48,36 @@ exec "$APPDIR"/usr/bin/python "$APPDIR"/usr/bin/syncplay "$@" EAT chmod +x AppRun.sh +# add AppStream metadata +mkdir -p AppDir/usr/share/metainfo/ +cat > pl.syncplay.syncplay.appdata.xml <<\EAT + + + pl.syncplay.syncplay + MIT + Apache-2.0 + Syncplay + Client/server to synchronize media playback on mpv/VLC/MPC-HC/MPC-BE on many computers + +

Syncplay synchronises the position and play state of multiple media players so that the viewers can watch the same thing at the same time. This means that when one person pauses/unpauses playback or seeks (jumps position) within their media player then this will be replicated across all media players connected to the same server and in the same 'room' (viewing session). When a new person joins they will also be synchronised. Syncplay also includes text-based chat so you can discuss a video as you watch it (or you could use third-party Voice over IP software to talk over a video).

+
+ pl.syncplay.syncplay.desktop + https://syncplay.pl/ + + + https://syncplay.pl/wp-content/themes/big-city-child/SyncplayExplained.png + + + + pl.syncplay.syncplay.desktop + +
+EAT +mv pl.syncplay.syncplay.appdata.xml AppDir/usr/share/metainfo/ + +# move and rename .desktop file +cp "$REPO_ROOT"/syncplay/resources/syncplay.desktop ./pl.syncplay.syncplay.desktop + #export CONDA_PACKAGES="Pillow" export PIP_REQUIREMENTS="." export PIP_WORKDIR="$REPO_ROOT" @@ -53,7 +86,7 @@ export OUTPUT=Syncplay-$VERSION-x86_64.AppImage ./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin conda \ -e $(which readelf) \ - -i "$REPO_ROOT"/syncplay/resources/syncplay.png -d "$REPO_ROOT"/syncplay/resources/syncplay.desktop \ + -i "$REPO_ROOT"/syncplay/resources/syncplay.png -d pl.syncplay.syncplay.desktop \ --output appimage --custom-apprun AppRun.sh mv Syncplay*.AppImage "$OLD_CWD" \ No newline at end of file From db6a0025008fb215b21c42d13cefb0272b41f7dd Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Thu, 23 May 2019 00:28:24 +0200 Subject: [PATCH 045/105] AppImage: allow running the server using a fixed argument --- travis/appimage-script.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/travis/appimage-script.sh b/travis/appimage-script.sh index 252b8de..66d0676 100755 --- a/travis/appimage-script.sh +++ b/travis/appimage-script.sh @@ -38,13 +38,17 @@ chmod +x linuxdeploy*.sh # set up custom AppRun script cat > AppRun.sh <<\EAT -#! /bin/sh +#! /bin/bash # make sure to set APPDIR when run directly from the AppDir if [ -z $APPDIR ]; then APPDIR=$(readlink -f $(dirname "$0")); fi export LD_LIBRARY_PATH="$APPDIR"/usr/lib export PATH="$PATH":"$APPDIR"/usr/bin -exec "$APPDIR"/usr/bin/python "$APPDIR"/usr/bin/syncplay "$@" +if [ "$1" == "--server" ]; then + exec "$APPDIR"/usr/bin/python "$APPDIR"/usr/bin/syncplay-server "${@:2}" +else + exec "$APPDIR"/usr/bin/python "$APPDIR"/usr/bin/syncplay "$@" +fi EAT chmod +x AppRun.sh From b1a3d0f793107ddbcf9861c35a64ea4653f76d77 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Mon, 27 May 2019 00:31:40 +0200 Subject: [PATCH 046/105] Release some files under the MIT license. The freedesktop project requires that the AppStream metadata are released under a subset of licenses that does not include Apache 2.0. For this reason, we decided to change the license of the README file and release it under the MIT license (after obtaining explicit permission from all the contributors to that file). With the same goal, the script that generates the AppImage and the AppStreams metadata is also released under the MIT license. The README file now clearly states the project license and that some files are released under a different license, as declared in their header or in our third-party notices file. --- README.md | 27 ++++++++++++++++++++++ syncplay/resources/third-party-notices.rtf | 18 +++++++++++++++ travis/appimage-script.sh | 20 +++++++++++++++- 3 files changed, 64 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a873676..383d097 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,26 @@ + + # Syncplay Solution to synchronize video playback across multiple instances of mpv, VLC, MPC-HC, MPC-BE and mplayer2 over the Internet. @@ -18,6 +41,10 @@ When a new person joins they will also be synchronised. Syncplay also includes t Syncplay is not a file sharing service. +## License + +This project, the Syncplay released binaries, and all the files included in this repository unless stated otherwise in the header of the file, are licensed under the [Apache License, version 2.0](https://www.apache.org/licenses/LICENSE-2.0.html). A copy of this license is included in the LICENSE file of this repository. Licenses and attribution notices for third-party media are set out in [third-party-notices.rtf](syncplay/resources/third-party-notices.rtf). + ## Authors * *Initial concept and core internals developer* - Uriziel. * *GUI design and current lead developer* - Et0h. diff --git a/syncplay/resources/third-party-notices.rtf b/syncplay/resources/third-party-notices.rtf index 207ed83..bd2c722 100644 --- a/syncplay/resources/third-party-notices.rtf +++ b/syncplay/resources/third-party-notices.rtf @@ -303,6 +303,24 @@ TIONS OF ANY KIND, either express or implied. See the License for the specific l uage governing permissions and limitations under the License.\ \ +\b mpv-repl +\b0 \ +\ +Copyright 2016, James Ross-Gowan\ +\ +Permission to use, copy, modify, and/or distribute this software for any\ +purpose with or without fee is hereby granted, provided that the above\ +copyright notice and this permission notice appear in all copies.\ +\ +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\ +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\ +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\ +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\ +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\ +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\ +PERFORMANCE OF THIS SOFTWARE.\ +\ + \b python-certifi \b0 \ \ diff --git a/travis/appimage-script.sh b/travis/appimage-script.sh index 66d0676..0e71716 100755 --- a/travis/appimage-script.sh +++ b/travis/appimage-script.sh @@ -1,7 +1,25 @@ #! /bin/bash # Copyright (C) 2019 Syncplay -# Licensed under the MIT license - http://opensource.org/licenses/MIT +# This file is licensed under the MIT license - http://opensource.org/licenses/MIT + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. set -x set -e From a288af2eeb7a724e34116264ab82dd864012d176 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Mon, 27 May 2019 17:04:04 +0200 Subject: [PATCH 047/105] AppImage: update screenshot URL in the AppStream manifest --- travis/appimage-script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/appimage-script.sh b/travis/appimage-script.sh index 0e71716..8bd0ec0 100755 --- a/travis/appimage-script.sh +++ b/travis/appimage-script.sh @@ -87,7 +87,7 @@ cat > pl.syncplay.syncplay.appdata.xml <<\EAT https://syncplay.pl/ - https://syncplay.pl/wp-content/themes/big-city-child/SyncplayExplained.png + https://syncplay.pl/2019-05-26.png From 902ba7a879c3c8b275955d824d4f3f379b7a6b7b Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Wed, 5 Jun 2019 22:51:22 +0200 Subject: [PATCH 048/105] Embed libxkbcommon-x11-0 in the AppImage bundle --- .travis.yml | 3 +++ travis/appimage-script.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c571631..3a8e895 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,9 @@ matrix: dist: xenial python: 3.6 env: BUILD_DESTINATION=appimage + apt: + packages: + - libxkbcommon-x11-0 branches: only: diff --git a/travis/appimage-script.sh b/travis/appimage-script.sh index 8bd0ec0..56283c3 100755 --- a/travis/appimage-script.sh +++ b/travis/appimage-script.sh @@ -109,6 +109,6 @@ export OUTPUT=Syncplay-$VERSION-x86_64.AppImage ./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin conda \ -e $(which readelf) \ -i "$REPO_ROOT"/syncplay/resources/syncplay.png -d pl.syncplay.syncplay.desktop \ - --output appimage --custom-apprun AppRun.sh + --output appimage --custom-apprun AppRun.sh -l /usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 mv Syncplay*.AppImage "$OLD_CWD" \ No newline at end of file From ed95359f0f05ed84ba0e695ad93ac71e73d0aca9 Mon Sep 17 00:00:00 2001 From: albertosottile Date: Wed, 5 Jun 2019 23:21:26 +0200 Subject: [PATCH 049/105] AppImage: install libxkbcommon-x11-0 explicitely --- .travis.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3a8e895..167bfb3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,9 +11,6 @@ matrix: dist: xenial python: 3.6 env: BUILD_DESTINATION=appimage - apt: - packages: - - libxkbcommon-x11-0 branches: only: @@ -27,7 +24,7 @@ script: install: - if [ "$TRAVIS_OS_NAME" == "osx" ]; then travis/macos-install.sh ; fi - if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_DESTINATION" == "snapcraft" ]; then travis/snapcraft-install.sh ; fi -- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_DESTINATION" == "appimage" ]; then ls -al ; fi +- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_DESTINATION" == "appimage" ]; then sudo apt-get install libxkbcommon-x11-0 ; fi before_deploy: - ls -al From b334dd5e770b51750932181b9e957f1345bc058d Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Tue, 18 Jun 2019 18:49:54 +0200 Subject: [PATCH 050/105] Do not ask to press enter from CLI after quitting mpv Fixes: #238 --- syncplay/players/mplayer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncplay/players/mplayer.py b/syncplay/players/mplayer.py index b1baa6b..a46e77f 100755 --- a/syncplay/players/mplayer.py +++ b/syncplay/players/mplayer.py @@ -305,7 +305,7 @@ class MplayerPlayer(BasePlayer): def drop(self): self._listener.sendLine('quit') self._takeLocksDown() - self.reactor.callFromThread(self._client.stop, True) + self.reactor.callFromThread(self._client.stop, False) class __Listener(threading.Thread): def __init__(self, playerController, playerPath, filePath, args): From 291463bb0d28e9147231e3286f293fb05e20c21d Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Fri, 21 Jun 2019 18:41:29 +0200 Subject: [PATCH 051/105] Upver to 1.6.4 / release 76 --- syncplay/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syncplay/__init__.py b/syncplay/__init__.py index 613ca26..9fcf140 100755 --- a/syncplay/__init__.py +++ b/syncplay/__init__.py @@ -1,5 +1,5 @@ -version = '1.6.3' +version = '1.6.4' revision = '' milestone = 'Yoitsu' -release_number = '75' +release_number = '76' projectURL = 'https://syncplay.pl/' From b37a514050d4617efc1ba7b84a061df18907d8f6 Mon Sep 17 00:00:00 2001 From: et0h Date: Fri, 21 Jun 2019 22:26:24 +0100 Subject: [PATCH 052/105] Fix issue displaying GuiConfig errors when using PyQt >= 5.12.1 (#240) --- syncplay/__init__.py | 2 +- syncplay/ui/GuiConfiguration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/syncplay/__init__.py b/syncplay/__init__.py index 9fcf140..4572ef3 100755 --- a/syncplay/__init__.py +++ b/syncplay/__init__.py @@ -1,5 +1,5 @@ version = '1.6.4' revision = '' milestone = 'Yoitsu' -release_number = '76' +release_number = '77' projectURL = 'https://syncplay.pl/' diff --git a/syncplay/ui/GuiConfiguration.py b/syncplay/ui/GuiConfiguration.py index 5030333..ebb5889 100755 --- a/syncplay/ui/GuiConfiguration.py +++ b/syncplay/ui/GuiConfiguration.py @@ -711,7 +711,7 @@ class ConfigDialog(QtWidgets.QDialog): self.errorLabel.setStyleSheet(constants.STYLE_SUCCESSLABEL) self.errorLabel.setText(error) self.errorLabel.setAlignment(Qt.AlignCenter) - self.basicOptionsLayout.addWidget(self.errorLabel, 0, 0) + self.basicOptionsLayout.addWidget(self.errorLabel) self.connectionSettingsGroup.setMaximumHeight(self.connectionSettingsGroup.minimumSizeHint().height()) self.basicOptionsLayout.setAlignment(Qt.AlignTop) self.basicOptionsLayout.addWidget(self.connectionSettingsGroup) From 763406b6604679b984d685bea5036a70a228b6c9 Mon Sep 17 00:00:00 2001 From: albertosottile Date: Fri, 21 Jun 2019 23:34:06 +0200 Subject: [PATCH 053/105] ConfigDialog: adjust dialog height when errors are shown on macOS --- syncplay/ui/GuiConfiguration.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/syncplay/ui/GuiConfiguration.py b/syncplay/ui/GuiConfiguration.py index ebb5889..f062707 100755 --- a/syncplay/ui/GuiConfiguration.py +++ b/syncplay/ui/GuiConfiguration.py @@ -1419,6 +1419,8 @@ class ConfigDialog(QtWidgets.QDialog): self.storeAndRunButton.setFocus() if isMacOS(): initialHeight = self.connectionSettingsGroup.minimumSizeHint().height()+self.mediaplayerSettingsGroup.minimumSizeHint().height()+self.bottomButtonFrame.minimumSizeHint().height()+50 + if self.error: + initialHeight += 40 self.setFixedWidth(self.sizeHint().width()) self.setFixedHeight(initialHeight) else: From 3ea4822e7f15c9bef998b5b9ba6b60e1f8c2a740 Mon Sep 17 00:00:00 2001 From: albertosottile Date: Fri, 21 Jun 2019 23:36:40 +0200 Subject: [PATCH 054/105] Upver to release 78 --- syncplay/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncplay/__init__.py b/syncplay/__init__.py index 4572ef3..3f40e42 100755 --- a/syncplay/__init__.py +++ b/syncplay/__init__.py @@ -1,5 +1,5 @@ version = '1.6.4' revision = '' milestone = 'Yoitsu' -release_number = '77' +release_number = '78' projectURL = 'https://syncplay.pl/' From bcc3cbf44c0e5f3c847f9f0ef332b99f68a318ca Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Sun, 23 Jun 2019 00:43:21 +0200 Subject: [PATCH 055/105] Explicitly set "start in" path in links generated by NSIS. Fixes: #241 --- buildPy2exe.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/buildPy2exe.py b/buildPy2exe.py index 58cda51..dc5b4c6 100755 --- a/buildPy2exe.py +++ b/buildPy2exe.py @@ -389,6 +389,7 @@ NSIS_SCRIPT_TEMPLATE = r""" $${If} $$CheckBox_StartMenuShortcut_State == $${BST_CHECKED} CreateDirectory $$SMPROGRAMS\Syncplay + SetOutPath "$$INSTDIR" CreateShortCut "$$SMPROGRAMS\Syncplay\Syncplay.lnk" "$$INSTDIR\Syncplay.exe" "" CreateShortCut "$$SMPROGRAMS\Syncplay\Syncplay Server.lnk" "$$INSTDIR\syncplayServer.exe" "" CreateShortCut "$$SMPROGRAMS\Syncplay\Uninstall.lnk" "$$INSTDIR\Uninstall.exe" "" @@ -396,10 +397,12 @@ NSIS_SCRIPT_TEMPLATE = r""" $${EndIf} $${If} $$CheckBox_DesktopShortcut_State == $${BST_CHECKED} + SetOutPath "$$INSTDIR" CreateShortCut "$$DESKTOP\Syncplay.lnk" "$$INSTDIR\Syncplay.exe" "" $${EndIf} $${If} $$CheckBox_QuickLaunchShortcut_State == $${BST_CHECKED} + SetOutPath "$$INSTDIR" CreateShortCut "$$QUICKLAUNCH\Syncplay.lnk" "$$INSTDIR\Syncplay.exe" "" $${EndIf} FunctionEnd From a35c7a5c9ceb9ab1d34cb7886b748aa636a09944 Mon Sep 17 00:00:00 2001 From: et0h Date: Sun, 23 Jun 2019 11:40:20 +0100 Subject: [PATCH 056/105] Set 1.6.4 as most recent client --- syncplay/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncplay/constants.py b/syncplay/constants.py index 7d63c03..a444409 100755 --- a/syncplay/constants.py +++ b/syncplay/constants.py @@ -29,7 +29,7 @@ MPLAYER_OSD_LEVEL = 1 UI_TIME_FORMAT = "[%X] " CONFIG_NAMES = [".syncplay", "syncplay.ini"] # Syncplay searches first to last DEFAULT_CONFIG_NAME = "syncplay.ini" -RECENT_CLIENT_THRESHOLD = "1.6.3" # This and higher considered 'recent' clients (no warnings) +RECENT_CLIENT_THRESHOLD = "1.6.4" # This and higher considered 'recent' clients (no warnings) WARN_OLD_CLIENTS = True # Use MOTD to inform old clients to upgrade LIST_RELATIVE_CONFIGS = True # Print list of relative configs loaded SHOW_CONTACT_INFO = True # Displays dev contact details below list in GUI From 1d8ae6ea5677cc623dbd3fff0b85e1b6deb46cbd Mon Sep 17 00:00:00 2001 From: et0h Date: Sun, 23 Jun 2019 11:53:06 +0100 Subject: [PATCH 057/105] Upver to 1.6.4a (release 79) and show revision in window title --- syncplay/__init__.py | 4 ++-- syncplay/ui/gui.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/syncplay/__init__.py b/syncplay/__init__.py index 3f40e42..c10619e 100755 --- a/syncplay/__init__.py +++ b/syncplay/__init__.py @@ -1,5 +1,5 @@ version = '1.6.4' -revision = '' +revision = 'a' milestone = 'Yoitsu' -release_number = '78' +release_number = '79' projectURL = 'https://syncplay.pl/' diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index f155c2d..87ffc77 100755 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -1939,7 +1939,7 @@ class MainWindow(QtWidgets.QMainWindow): self.setWindowFlags(self.windowFlags()) else: self.setWindowFlags(self.windowFlags() & Qt.AA_DontUseNativeMenuBar) - self.setWindowTitle("Syncplay v" + version) + self.setWindowTitle("Syncplay v" + version + revision) self.mainLayout = QtWidgets.QVBoxLayout() self.addTopLayout(self) self.addBottomLayout(self) From 5aee6d97c916e4e6b8fc05c988ebd16409a26b94 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Sat, 6 Jul 2019 16:47:08 +0200 Subject: [PATCH 058/105] macOS: OS-related menus were in German when the OS lang set was English --- travis/macos-deploy.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/travis/macos-deploy.sh b/travis/macos-deploy.sh index 3fb21ab..2b192b9 100755 --- a/travis/macos-deploy.sh +++ b/travis/macos-deploy.sh @@ -1,9 +1,13 @@ #!/usr/bin/env bash +mkdir dist/Syncplay.app/Contents/Resources/English.lproj +mkdir dist/Syncplay.app/Contents/Resources/en_AU.lproj +mkdir dist/Syncplay.app/Contents/Resources/en_GB.lproj mkdir dist/Syncplay.app/Contents/Resources/German.lproj mkdir dist/Syncplay.app/Contents/Resources/Italian.lproj mkdir dist/Syncplay.app/Contents/Resources/ru.lproj mkdir dist/Syncplay.app/Contents/Resources/Spanish.lproj +mkdir dist/Syncplay.app/Contents/Resources/es_419.lproj pip3 install dmgbuild mv syncplay/resources/macOS_readme.pdf syncplay/resources/.macOS_readme.pdf dmgbuild -s appdmg.py "Syncplay" dist_bintray/Syncplay_${VER}.dmg From e7a475ddbed6273dae8257d0c41b9a3a004b7d34 Mon Sep 17 00:00:00 2001 From: Robin Lu Date: Fri, 26 Jul 2019 05:21:12 +0800 Subject: [PATCH 059/105] Misspell: change "inteface" to "interface" (#247) Changing "zope.inteface" to "zope.interface" for dependencies installation. --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 84f4305..506c59c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,4 @@ certifi>=2018.11.29 twisted[tls]>=16.4.0 appnope>=0.1.0; sys_platform == 'darwin' pypiwin32>=223; sys_platform == 'win32' -zope.inteface>=4.4.0; sys_platform == 'win32' \ No newline at end of file +zope.interface>=4.4.0; sys_platform == 'win32' From 187c8d87fc369faa9b0a71715f771b94ea9810fc Mon Sep 17 00:00:00 2001 From: et0h Date: Tue, 6 Aug 2019 00:17:19 +0100 Subject: [PATCH 060/105] Add initial mpv.net support --- syncplay/__init__.py | 6 ++-- syncplay/constants.py | 3 ++ syncplay/messages_de.py | 4 +-- syncplay/messages_en.py | 4 +-- syncplay/messages_es.py | 4 +-- syncplay/messages_it.py | 4 +-- syncplay/messages_ru.py | 4 +-- syncplay/players/__init__.py | 3 +- syncplay/players/mpv.py | 2 +- syncplay/players/mpvnet.py | 51 ++++++++++++++++++++++++++++++++++ syncplay/resources/mpvnet.ico | Bin 0 -> 25723 bytes 11 files changed, 70 insertions(+), 15 deletions(-) create mode 100644 syncplay/players/mpvnet.py create mode 100644 syncplay/resources/mpvnet.ico diff --git a/syncplay/__init__.py b/syncplay/__init__.py index c10619e..08032d7 100755 --- a/syncplay/__init__.py +++ b/syncplay/__init__.py @@ -1,5 +1,5 @@ -version = '1.6.4' -revision = 'a' +version = '1.6.5' +revision = ' development' milestone = 'Yoitsu' -release_number = '79' +release_number = '80' projectURL = 'https://syncplay.pl/' diff --git a/syncplay/constants.py b/syncplay/constants.py index a444409..7f0fcf5 100755 --- a/syncplay/constants.py +++ b/syncplay/constants.py @@ -155,6 +155,8 @@ 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", "/Applications/mpv.app/Contents/MacOS/mpv"] +MPVNET_PATHS = [r"c:\program files\mpv.net\mpvnet.exe", r"c:\program files\mpv.net\mpvnet.exe", + r"c:\program Files (x86)\mpv.net\mpvnet.exe", r"c:\program Files (x86)\mpv.net\mpvnet.exe"] VLC_PATHS = [ r"c:\program files (x86)\videolan\vlc\vlc.exe", r"c:\program files\videolan\vlc\vlc.exe", @@ -169,6 +171,7 @@ VLC_PATHS = [ VLC_ICONPATH = "vlc.png" MPLAYER_ICONPATH = "mplayer.png" MPV_ICONPATH = "mpv.png" +MPVNET_ICONPATH = "mpvnet.ico" MPC_ICONPATH = "mpc-hc.png" MPC64_ICONPATH = "mpc-hc64.png" MPC_BE_ICONPATH = "mpc-be.png" diff --git a/syncplay/messages_de.py b/syncplay/messages_de.py index 070b7ca..4d1837f 100755 --- a/syncplay/messages_de.py +++ b/syncplay/messages_de.py @@ -108,7 +108,7 @@ de = { "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).", "player-file-open-error": "Fehler beim Öffnen der Datei durch den Player", - "player-path-error": "Ungültiger Player-Pfad. Supported players are: mpv, VLC, MPC-HC, MPC-BE and mplayer2", # To do: Translate end + "player-path-error": "Ungültiger Player-Pfad. Supported players are: mpv, mpv.net, VLC, MPC-HC, MPC-BE and mplayer2", # To do: Translate end "hostname-empty-error": "Hostname darf nicht leer sein", "empty-error": "{} darf nicht leer sein", # Configuration "media-player-error": "Player-Fehler: \"{}\"", # Error line @@ -119,7 +119,7 @@ de = { "unable-to-start-client-error": "Client kann nicht gestartet werden", - "player-path-config-error": "Player-Pfad ist nicht ordnungsgemäß gesetzt. Supported players are: mpv, VLC, MPC-HC, MPC-BE and mplayer2.", # To do: Translate end + "player-path-config-error": "Player-Pfad ist nicht ordnungsgemäß gesetzt. Supported players are: mpv, mpv.net, VLC, MPC-HC, MPC-BE and mplayer2.", # To do: Translate end "no-file-path-config-error": "Es muss eine Datei ausgewählt werden, bevor der Player gestartet wird.", "no-hostname-config-error": "Hostname darf nicht leer sein", "invalid-port-config-error": "Port muss gültig sein", diff --git a/syncplay/messages_en.py b/syncplay/messages_en.py index 1f02846..b51ad1d 100755 --- a/syncplay/messages_en.py +++ b/syncplay/messages_en.py @@ -108,7 +108,7 @@ en = { "mpc-be-version-insufficient-error": "MPC version not sufficient, please use `mpc-be` >= `{}`", "mpv-version-error": "Syncplay is not compatible with this version of mpv. Please use a different version of mpv (e.g. Git HEAD).", "player-file-open-error": "Player failed opening file", - "player-path-error": "Player path is not set properly. Supported players are: mpv, VLC, MPC-HC, MPC-BE and mplayer2", + "player-path-error": "Player path is not set properly. Supported players are: mpv, mpv.net, VLC, MPC-HC, MPC-BE and mplayer2", "hostname-empty-error": "Hostname can't be empty", "empty-error": "{} can't be empty", # Configuration "media-player-error": "Media player error: \"{}\"", # Error line @@ -119,7 +119,7 @@ en = { "unable-to-start-client-error": "Unable to start client", - "player-path-config-error": "Player path is not set properly. Supported players are: mpv, VLC, MPC-HC, MPC-BE and mplayer2.", + "player-path-config-error": "Player path is not set properly. Supported players are: mpv, mpv.net, VLC, MPC-HC, MPC-BE and mplayer2.", "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", diff --git a/syncplay/messages_es.py b/syncplay/messages_es.py index 0ebd4cd..932f68b 100644 --- a/syncplay/messages_es.py +++ b/syncplay/messages_es.py @@ -108,7 +108,7 @@ es = { "mpc-be-version-insufficient-error": "La versión de MPC no es suficiente, por favor utiliza `mpc-be` >= `{}`", "mpv-version-error": "Syncplay no es compatible con esta versión de mpv. Por favor utiliza una versión diferente de mpv (p.ej. Git HEAD).", "player-file-open-error": "El reproductor falló al abrir el archivo", - "player-path-error": "La ruta del reproductor no está definida correctamente. Los reproductores soportados son: mpv, VLC, MPC-HC, MPC-BE y mplayer2", + "player-path-error": "La ruta del reproductor no está definida correctamente. Los reproductores soportados son: mpv, mpv.net, VLC, MPC-HC, MPC-BE y mplayer2", "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 @@ -119,7 +119,7 @@ es = { "unable-to-start-client-error": "No se logró iniciar el cliente", - "player-path-config-error": "La ruta del reproductor no está definida correctamente. Los reproductores soportados son: mpv, VLC, MPC-HC, MPC-BE y mplayer2.", + "player-path-config-error": "La ruta del reproductor no está definida correctamente. Los reproductores soportados son: mpv, mpv.net, VLC, MPC-HC, MPC-BE y mplayer2.", "no-file-path-config-error": "El archivo debe ser seleccionado antes de iniciar el reproductor", "no-hostname-config-error": "El nombre del host no puede ser vacío", "invalid-port-config-error": "El puerto debe ser válido", diff --git a/syncplay/messages_it.py b/syncplay/messages_it.py index 43809a9..df44bb9 100755 --- a/syncplay/messages_it.py +++ b/syncplay/messages_it.py @@ -108,7 +108,7 @@ it = { "mpc-be-version-insufficient-error": "La tua versione di MPC è troppo vecchia, per favore usa `mpc-be` >= `{}`", "mpv-version-error": "Syncplay non è compatibile con questa versione di mpv. Per favore usa un'altra versione di mpv (es. Git HEAD).", "player-file-open-error": "Il player non è riuscito ad aprire il file", - "player-path-error": "Il path del player non è configurato correttamente. I player supportati sono: mpv, VLC, MPC-HC, MPC-BE e mplayer2", + "player-path-error": "Il path del player non è configurato correttamente. I player supportati sono: mpv, mpv.net, VLC, MPC-HC, MPC-BE e mplayer2", "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 @@ -119,7 +119,7 @@ it = { "unable-to-start-client-error": "Impossibile avviare il client", - "player-path-config-error": "Il percorso del player non è configurato correttamente. I player supportati sono: mpv, VLC, MPC-HC, MPC-BE e mplayer2.", + "player-path-config-error": "Il percorso del player non è configurato correttamente. I player supportati sono: mpv, mpv.net, VLC, MPC-HC, MPC-BE e mplayer2.", "no-file-path-config-error": "Deve essere selezionato un file prima di avviare il player", "no-hostname-config-error": "Il campo hostname non può essere vuoto", "invalid-port-config-error": "La porta deve essere valida", diff --git a/syncplay/messages_ru.py b/syncplay/messages_ru.py index 2d9be9c..26aadd1 100755 --- a/syncplay/messages_ru.py +++ b/syncplay/messages_ru.py @@ -108,7 +108,7 @@ ru = { "mpc-be-version-insufficient-error": "Версия MPC слишком старая, пожалуйста, используйте `mpc-be` >= `{}`", "mpv-version-error": "Syncplay не совместим с данной версией mpv. Пожалуйста, используйте другую версию mpv (лучше свежайшую).", "player-file-open-error": "Проигрыватель не может открыть файл.", - "player-path-error": "Путь к проигрывателю задан неверно. Supported players are: mpv, VLC, MPC-HC, MPC-BE and mplayer2.", # TODO: Translate last sentence + "player-path-error": "Путь к проигрывателю задан неверно. Supported players are: mpv, mpv.net, VLC, MPC-HC, MPC-BE and mplayer2.", # TODO: Translate last sentence "hostname-empty-error": "Имя пользователя не может быть пустым.", "empty-error": "{} не может быть пустым.", # Configuration "media-player-error": "Ошибка проигрывателя: \"{}\"", # Error line @@ -119,7 +119,7 @@ ru = { "unable-to-start-client-error": "Невозможно запустить клиент", - "player-path-config-error": "Путь к проигрывателю установлен неверно. Supported players are: mpv, VLC, MPC-HC, MPC-BE and mplayer2", # To do: Translate end + "player-path-config-error": "Путь к проигрывателю установлен неверно. Supported players are: mpv, mpv.net, VLC, MPC-HC, MPC-BE and mplayer2", # To do: Translate end "no-file-path-config-error": "Файл должен быть указан до включения проигрывателя", "no-hostname-config-error": "Имя сервера не может быть пустым", "invalid-port-config-error": "Неверный номер порта", diff --git a/syncplay/players/__init__.py b/syncplay/players/__init__.py index 9fb3563..8c812db 100755 --- a/syncplay/players/__init__.py +++ b/syncplay/players/__init__.py @@ -1,5 +1,6 @@ from syncplay.players.mplayer import MplayerPlayer from syncplay.players.mpv import MpvPlayer +from syncplay.players.mpvnet import MpvnetPlayer from syncplay.players.vlc import VlcPlayer try: from syncplay.players.mpc import MPCHCAPIPlayer @@ -14,4 +15,4 @@ except ImportError: def getAvailablePlayers(): - return [MPCHCAPIPlayer, MpvPlayer, VlcPlayer, MpcBePlayer, MplayerPlayer] + return [MPCHCAPIPlayer, MpvPlayer, MpvnetPlayer, VlcPlayer, MpcBePlayer, MplayerPlayer] diff --git a/syncplay/players/mpv.py b/syncplay/players/mpv.py index 776a9a3..622d296 100755 --- a/syncplay/players/mpv.py +++ b/syncplay/players/mpv.py @@ -55,7 +55,7 @@ class MpvPlayer(MplayerPlayer): @staticmethod def isValidPlayerPath(path): - if "mpv" in path and MpvPlayer.getExpandedPath(path): + if "mpv" in path and "mpvnet" not in path and MpvPlayer.getExpandedPath(path): return True return False diff --git a/syncplay/players/mpvnet.py b/syncplay/players/mpvnet.py new file mode 100644 index 0000000..5813e37 --- /dev/null +++ b/syncplay/players/mpvnet.py @@ -0,0 +1,51 @@ +import os +from syncplay import constants +from syncplay.players.mpv import NewMpvPlayer + +class MpvnetPlayer(NewMpvPlayer): + + + @staticmethod + def run(client, playerPath, filePath, args): + constants.MPV_NEW_VERSION = True + constants.MPV_OSC_VISIBILITY_CHANGE_VERSION = True + return MpvnetPlayer(client, MpvnetPlayer.getExpandedPath(playerPath), filePath, args) + + @staticmethod + def getDefaultPlayerPathsList(): + l = [] + for path in constants.MPVNET_PATHS: + p = MpvnetPlayer.getExpandedPath(path) + if p: + l.append(p) + return l + + + @staticmethod + def isValidPlayerPath(path): + if "mpvnet" in path and MpvnetPlayer.getExpandedPath(path): + return True + return False + + + @staticmethod + def getExpandedPath(playerPath): + if not os.path.isfile(playerPath): + if os.path.isfile(playerPath + "mpvnet.exe"): + playerPath += "mpvnet.exe" + return playerPath + elif os.path.isfile(playerPath + "\\mpvnet.exe"): + playerPath += "\\mpvnet.exe" + return playerPath + if os.access(playerPath, os.X_OK): + return playerPath + for path in os.environ['PATH'].split(':'): + path = os.path.join(os.path.realpath(path), playerPath) + if os.access(path, os.X_OK): + return path + + + @staticmethod + def getIconPath(path): + return constants.MPVNET_ICONPATH + diff --git a/syncplay/resources/mpvnet.ico b/syncplay/resources/mpvnet.ico new file mode 100644 index 0000000000000000000000000000000000000000..a70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d00001 From 0f284e7329eed6a86ecbfd9a2d3a3c392bfbedc3 Mon Sep 17 00:00:00 2001 From: et0h Date: Wed, 7 Aug 2019 22:26:22 +0100 Subject: [PATCH 061/105] Make mpv code compatible with mpvnet --- syncplay/__init__.py | 2 +- syncplay/players/mpv.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/syncplay/__init__.py b/syncplay/__init__.py index 08032d7..5132d32 100755 --- a/syncplay/__init__.py +++ b/syncplay/__init__.py @@ -1,5 +1,5 @@ version = '1.6.5' revision = ' development' milestone = 'Yoitsu' -release_number = '80' +release_number = '81' projectURL = 'https://syncplay.pl/' diff --git a/syncplay/players/mpv.py b/syncplay/players/mpv.py index 622d296..c27a684 100755 --- a/syncplay/players/mpv.py +++ b/syncplay/players/mpv.py @@ -128,7 +128,7 @@ class NewMpvPlayer(OldMpvPlayer): def displayMessage(self, message, duration=(constants.OSD_DURATION * 1000), OSDType=constants.OSD_NOTIFICATION, mood=constants.MESSAGE_NEUTRAL): if not self._client._config["chatOutputEnabled"]: - super(self.__class__, self).displayMessage(message=message, duration=duration, OSDType=OSDType, mood=mood) + MplayerPlayer.displayMessage(self, message=message, duration=duration, OSDType=OSDType, mood=mood) return messageString = self._sanitizeText(message.replace("\\n", "")).replace( "\\\\", constants.MPV_INPUT_BACKSLASH_SUBSTITUTE_CHARACTER).replace("", "\\n") @@ -136,7 +136,7 @@ class NewMpvPlayer(OldMpvPlayer): def displayChatMessage(self, username, message): if not self._client._config["chatOutputEnabled"]: - super(self.__class__, self).displayChatMessage(username, message) + MplayerPlayer.displayChatMessage(self, username, message) return username = self._sanitizeText(username.replace("\\", constants.MPV_INPUT_BACKSLASH_SUBSTITUTE_CHARACTER)) message = self._sanitizeText(message.replace("\\", constants.MPV_INPUT_BACKSLASH_SUBSTITUTE_CHARACTER)) @@ -252,7 +252,7 @@ class NewMpvPlayer(OldMpvPlayer): self._client.ui.showDebugMessage( "Did not seek as recently reset and {} below 'do not reset position' threshold".format(value)) return - super(self.__class__, self).setPosition(value) + MplayerPlayer.setPosition(self, value) self.lastMPVPositionUpdate = time.time() def openFile(self, filePath, resetPosition=False): From 4765fa452caba35793003e48c953ddfddd7a05e0 Mon Sep 17 00:00:00 2001 From: et0h Date: Sat, 17 Aug 2019 16:33:01 +0100 Subject: [PATCH 062/105] Seamless advancement and auto-looping for music (mpv) --- syncplay/__init__.py | 2 +- syncplay/client.py | 24 ++++++++++++++++++++---- syncplay/constants.py | 1 + syncplay/players/mpv.py | 4 ++++ 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/syncplay/__init__.py b/syncplay/__init__.py index 5132d32..d544005 100755 --- a/syncplay/__init__.py +++ b/syncplay/__init__.py @@ -1,5 +1,5 @@ version = '1.6.5' revision = ' development' milestone = 'Yoitsu' -release_number = '81' +release_number = '82' projectURL = 'https://syncplay.pl/' diff --git a/syncplay/client.py b/syncplay/client.py index 8a42bc8..1df4acf 100755 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -199,9 +199,16 @@ class SyncplayClient(object): self.setPosition(-1) self.ui.showDebugMessage("Rewinded after double-check") + def isPlayingMusic(self): + if self.userlist.currentUser.file: + for musicFormat in constants.MUSIC_FORMATS: + if self.userlist.currentUser.file['name'].lower().endswith(musicFormat): + return True + def updatePlayerStatus(self, paused, position): position -= self.getUserOffset() pauseChange, seeked = self._determinePlayerStateChange(paused, position) + positionBeforeSeek = self._playerPosition self._playerPosition = position self._playerPaused = paused currentLength = self.userlist.currentUser.file["duration"] if self.userlist.currentUser.file else 0 @@ -222,7 +229,9 @@ class SyncplayClient(object): if self._lastGlobalUpdate: self._lastPlayerUpdate = time.time() - if (pauseChange or seeked) and self._protocol: + if seeked and not pauseChange and self.isPlayingMusic() and abs(positionBeforeSeek - currentLength) < constants.PLAYLIST_LOAD_NEXT_FILE_TIME_FROM_END_THRESHOLD and self.playlist.notJustChangedPlaylist(): + self.playlist.loadNextFileInPlaylist() + elif (pauseChange or seeked) and self._protocol: if seeked: self.playerPositionBeforeLastSeek = self.getGlobalPosition() self._protocol.sendState(self.getPlayerPosition(), self.getPlayerPaused(), seeked, None, True) @@ -230,7 +239,10 @@ class SyncplayClient(object): def prepareToAdvancePlaylist(self): if self.playlist.canSwitchToNextPlaylistIndex(): self.ui.showDebugMessage("Preparing to advance playlist...") - self._protocol.sendState(0, True, True, None, True) + if self.isPlayingMusic(): + self._protocol.sendState(0, False, True, None, True) + else: + self._protocol.sendState(0, True, True, None, True) else: self.ui.showDebugMessage("Not preparing to advance playlist because the next file cannot be switched to") @@ -527,10 +539,10 @@ class SyncplayClient(object): self.playlist.changeToPlaylistIndex(*args, **kwargs) def loopSingleFiles(self): - return self._config["loopSingleFiles"] + return self._config["loopSingleFiles"] or self.isPlayingMusic() def isPlaylistLoopingEnabled(self): - return self._config["loopAtEndOfPlaylist"] + return self._config["loopAtEndOfPlaylist"] or self.isPlayingMusic() def __executePrivacySettings(self, filename, size): if self._config['filenamePrivacyMode'] == PRIVACY_SENDHASHED_MODE: @@ -830,12 +842,16 @@ class SyncplayClient(object): self.autoplayCheck() def autoplayCheck(self): + if self.isPlayingMusic(): + return True if self.autoplayConditionsMet(): self.startAutoplayCountdown() else: self.stopAutoplayCountdown() def instaplayConditionsMet(self): + if self.isPlayingMusic(): + return True if not self.userlist.currentUser.canControl(): return False diff --git a/syncplay/constants.py b/syncplay/constants.py index 7f0fcf5..7cde152 100755 --- a/syncplay/constants.py +++ b/syncplay/constants.py @@ -30,6 +30,7 @@ UI_TIME_FORMAT = "[%X] " CONFIG_NAMES = [".syncplay", "syncplay.ini"] # Syncplay searches first to last DEFAULT_CONFIG_NAME = "syncplay.ini" RECENT_CLIENT_THRESHOLD = "1.6.4" # 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 SHOW_CONTACT_INFO = True # Displays dev contact details below list in GUI diff --git a/syncplay/players/mpv.py b/syncplay/players/mpv.py index c27a684..68beb0d 100755 --- a/syncplay/players/mpv.py +++ b/syncplay/players/mpv.py @@ -197,6 +197,10 @@ class NewMpvPlayer(OldMpvPlayer): return self._position def _storePosition(self, value): + if self._client.isPlayingMusic() and self._paused == False and self._position == value and abs(self._position-self._position) < 0.5: + self._client.ui.showDebugMessage("EOF DETECTED!") + self._position = 0 + self.setPosition(0) self.lastMPVPositionUpdate = time.time() if self._recentlyReset(): self._client.ui.showDebugMessage("Recently reset, so storing position as 0") From 51cc57ce032ca37813799981426ae53064033494 Mon Sep 17 00:00:00 2001 From: et0h Date: Sat, 17 Aug 2019 18:37:17 +0100 Subject: [PATCH 063/105] Load playlist from file (command line argument + drop) (#232) --- syncplay/client.py | 18 +++++++++++++++++- syncplay/messages_de.py | 2 ++ syncplay/messages_en.py | 2 ++ syncplay/messages_es.py | 2 ++ syncplay/messages_it.py | 2 ++ syncplay/messages_ru.py | 2 ++ syncplay/ui/ConfigurationGetter.py | 7 ++++++- syncplay/ui/gui.py | 28 ++++++++++++++-------------- 8 files changed, 47 insertions(+), 16 deletions(-) diff --git a/syncplay/client.py b/syncplay/client.py index 1df4acf..36b86ed 100755 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -520,7 +520,11 @@ class SyncplayClient(object): return True return False - def openFile(self, filePath, resetPosition=False): + def openFile(self, filePath, resetPosition=False, fromUser=False): + if fromUser and filePath.endswith(".txt") or filePath.endswith(".m3u") or filePath.endswith(".m3u8"): + self.playlist.loadPlaylistFromFile(filePath, resetPosition) + return + self.playlist.openedFile() self._player.openFile(filePath, resetPosition) if resetPosition: @@ -673,6 +677,9 @@ class SyncplayClient(object): readyState = self._config['readyAtStart'] if self.userlist.currentUser.isReady() is None else self.userlist.currentUser.isReady() self._protocol.setReady(readyState, manuallyInitiated=False) self.reIdentifyAsController() + if self._config["loadPlaylistFromFile"]: + self.playlist.loadPlaylistFromFile(self._config["loadPlaylistFromFile"]) + self._config["loadPlaylistFromFile"] = None def getRoom(self): return self.userlist.currentUser.room @@ -1708,6 +1715,15 @@ class SyncplayPlaylist(): filename = _playlist[_index] if len(_playlist) > _index else None return filename + def loadPlaylistFromFile(self, path, shuffle=False): + with open(path) as f: + newPlaylist = f.read().splitlines() + if shuffle: + random.shuffle(newPlaylist) + if newPlaylist: + self.changePlaylist(newPlaylist, username=None, resetIndex=True) + + def changePlaylist(self, files, username=None, resetIndex=False): if self._playlist == files: if self._playlistIndex != 0 and resetIndex: diff --git a/syncplay/messages_de.py b/syncplay/messages_de.py index 4d1837f..e415256 100755 --- a/syncplay/messages_de.py +++ b/syncplay/messages_de.py @@ -173,6 +173,8 @@ de = { "version-argument": 'gibt die aktuelle Version aus', "version-message": "Du verwendest Syncplay v. {} ({})", + "load-playlist-from-file-argument": "loads playlist from text file (one entry per line)", # TODO: Translate + # Client labels "config-window-title": "Syncplay Konfiguration", diff --git a/syncplay/messages_en.py b/syncplay/messages_en.py index b51ad1d..113a780 100755 --- a/syncplay/messages_en.py +++ b/syncplay/messages_en.py @@ -173,6 +173,8 @@ en = { "version-argument": 'prints your version', "version-message": "You're using Syncplay version {} ({})", + "load-playlist-from-file-argument": "loads playlist from text file (one entry per line)", + # Client labels "config-window-title": "Syncplay configuration", diff --git a/syncplay/messages_es.py b/syncplay/messages_es.py index 932f68b..1625574 100644 --- a/syncplay/messages_es.py +++ b/syncplay/messages_es.py @@ -173,6 +173,8 @@ es = { "version-argument": 'imprime tu versión', "version-message": "Estás usando la versión de Syncplay {} ({})", + "load-playlist-from-file-argument": "loads playlist from text file (one entry per line)", # TODO: Translate + # Client labels "config-window-title": "Configuración de Syncplay", diff --git a/syncplay/messages_it.py b/syncplay/messages_it.py index df44bb9..23f8d77 100755 --- a/syncplay/messages_it.py +++ b/syncplay/messages_it.py @@ -173,6 +173,8 @@ it = { "version-argument": 'mostra la tua versione', "version-message": "Stai usando la versione di Syncplay {} ({})", + "load-playlist-from-file-argument": "loads playlist from text file (one entry per line)", # TODO: Translate + # Client labels "config-window-title": "Configurazione di Syncplay", diff --git a/syncplay/messages_ru.py b/syncplay/messages_ru.py index 26aadd1..cb9b026 100755 --- a/syncplay/messages_ru.py +++ b/syncplay/messages_ru.py @@ -174,6 +174,8 @@ ru = { "version-argument": 'выводит номер версии', "version-message": "Вы используете Syncplay версии {} ({})", + "load-playlist-from-file-argument": "loads playlist from text file (one entry per line)", # TODO: Translate + # Client labels "config-window-title": "Настройка Syncplay", diff --git a/syncplay/ui/ConfigurationGetter.py b/syncplay/ui/ConfigurationGetter.py index 720dfc0..8586301 100755 --- a/syncplay/ui/ConfigurationGetter.py +++ b/syncplay/ui/ConfigurationGetter.py @@ -92,7 +92,8 @@ class ConfigurationGetter(object): "notificationTimeout": 3, "alertTimeout": 5, "chatTimeout": 7, - "publicServers": [] + "publicServers": [], + "loadPlaylistFromFile": None } self._defaultConfig = self._config.copy() @@ -307,6 +308,8 @@ class ConfigurationGetter(object): key = "noGui" if key == "clear_gui_data": key = "clearGUIData" + if key == "load_playlist_from_file": + key = "loadPlaylistFromFile" self._config[key] = val def _splitPortAndHost(self, host): @@ -495,6 +498,8 @@ class ConfigurationGetter(object): self._argparser.add_argument('file', metavar='file', type=str, nargs='?', help=getMessage("file-argument")) self._argparser.add_argument('--clear-gui-data', action='store_true', help=getMessage("clear-gui-data-argument")) self._argparser.add_argument('-v', '--version', action='store_true', help=getMessage("version-argument")) + self._argparser.add_argument('--load-playlist-from-file', metavar="loadPlaylistFromFile", type=str, help=getMessage("load-playlist-from-file-argument")) + self._argparser.add_argument('_args', metavar='options', type=str, nargs='*', help=getMessage("args-argument")) args = self._argparser.parse_args() if args.version: diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 87ffc77..cfb233b 100755 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -692,9 +692,9 @@ class MainWindow(QtWidgets.QMainWindow): pathFound = self._syncplayClient.fileSwitch.findFilepath(firstFile) if not isURL(firstFile) else None if self._syncplayClient.userlist.currentUser.file is None or firstFile != self._syncplayClient.userlist.currentUser.file["name"]: if isURL(firstFile): - menu.addAction(QtGui.QPixmap(resourcespath + "world_go.png"), getMessage("openstreamurl-menu-label"), lambda: self.openFile(firstFile, resetPosition=True)) + menu.addAction(QtGui.QPixmap(resourcespath + "world_go.png"), getMessage("openstreamurl-menu-label"), lambda: self.openFile(firstFile, resetPosition=True, fromUser=True)) elif pathFound: - menu.addAction(QtGui.QPixmap(resourcespath + "film_go.png"), getMessage("openmedia-menu-label"), lambda: self.openFile(pathFound, resetPosition=True)) + menu.addAction(QtGui.QPixmap(resourcespath + "film_go.png"), getMessage("openmedia-menu-label"), lambda: self.openFile(pathFound, resetPosition=True, fromUser=True)) if pathFound: menu.addAction(QtGui.QPixmap(resourcespath + "folder_film.png"), getMessage('open-containing-folder'), @@ -753,11 +753,11 @@ class MainWindow(QtWidgets.QMainWindow): if self._syncplayClient.userlist.currentUser.file is None or filename != self._syncplayClient.userlist.currentUser.file["name"]: if isURL(filename): - menu.addAction(QtGui.QPixmap(resourcespath + "world_go.png"), getMessage("openusersstream-menu-label").format(shortUsername), lambda: self.openFile(filename)) + menu.addAction(QtGui.QPixmap(resourcespath + "world_go.png"), getMessage("openusersstream-menu-label").format(shortUsername), lambda: self.openFile(filename, resetPosition=False, fromUser=True)) else: pathFound = self._syncplayClient.fileSwitch.findFilepath(filename) if pathFound: - menu.addAction(QtGui.QPixmap(resourcespath + "film_go.png"), getMessage("openusersfile-menu-label").format(shortUsername), lambda: self.openFile(pathFound)) + menu.addAction(QtGui.QPixmap(resourcespath + "film_go.png"), getMessage("openusersfile-menu-label").format(shortUsername), lambda: self.openFile(pathFound, resetPosition=False, fromUser=True)) if self._syncplayClient.isUntrustedTrustableURI(filename): domain = utils.getDomainFromURL(filename) menu.addAction(QtGui.QPixmap(resourcespath + "shield_add.png"), getMessage("addtrusteddomain-menu-label").format(domain), lambda: self.addTrustedDomain(domain)) @@ -814,11 +814,11 @@ class MainWindow(QtWidgets.QMainWindow): if self._isTryingToChangeToCurrentFile(filename): return if isURL(filename): - self._syncplayClient._player.openFile(filename, resetPosition=True) + self._syncplayClient.openFile(filename, resetPosition=True) else: pathFound = self._syncplayClient.fileSwitch.findFilepath(filename, highPriority=True) if pathFound: - self._syncplayClient._player.openFile(pathFound, resetPosition=True) + self._syncplayClient.openFile(pathFound, resetPosition=True) else: self._syncplayClient.ui.showErrorMessage(getMessage("cannot-find-file-for-playlist-switch-error").format(filename)) @@ -841,11 +841,11 @@ class MainWindow(QtWidgets.QMainWindow): if self._isTryingToChangeToCurrentFile(filename): return if isURL(filename): - self._syncplayClient._player.openFile(filename) + self._syncplayClient.openFile(filename) else: pathFound = self._syncplayClient.fileSwitch.findFilepath(filename, highPriority=True) if pathFound: - self._syncplayClient._player.openFile(pathFound) + self._syncplayClient.openFile(pathFound) else: self._syncplayClient.fileSwitch.updateInfo() self.showErrorMessage(getMessage("switch-file-not-found-error").format(filename)) @@ -1006,7 +1006,7 @@ class MainWindow(QtWidgets.QMainWindow): self.mediadirectory = os.path.dirname(fileName) self._syncplayClient.fileSwitch.setCurrentDirectory(self.mediadirectory) self.saveMediaBrowseSettings() - self._syncplayClient._player.openFile(fileName) + self._syncplayClient.openFile(fileName, resetPosition=False, fromUser=True) @needsClient def OpenAddFilesToPlaylistDialog(self): @@ -1186,7 +1186,7 @@ class MainWindow(QtWidgets.QMainWindow): self, getMessage("promptforstreamurl-msgbox-label"), getMessage("promptforstreamurlinfo-msgbox-label"), QtWidgets.QLineEdit.Normal, "") if ok and streamURL != '': - self._syncplayClient._player.openFile(streamURL) + self._syncplayClient.openFile(streamURL, resetPosition=False, fromUser=True) @needsClient def createControlledRoom(self): @@ -1803,10 +1803,10 @@ class MainWindow(QtWidgets.QMainWindow): else: dropfilepath = os.path.abspath(str(url.toLocalFile())) if rewindFile == False: - self._syncplayClient._player.openFile(dropfilepath) + self._syncplayClient.openFile(dropfilepath, resetPosition=False, fromUser=True) else: self._syncplayClient.setPosition(0) - self._syncplayClient._player.openFile(dropfilepath, resetPosition=True) + self._syncplayClient.openFile(dropfilepath, resetPosition=True, fromUser=True) self._syncplayClient.setPosition(0) def setPlaylist(self, newPlaylist, newIndexFilename=None): @@ -1848,8 +1848,8 @@ class MainWindow(QtWidgets.QMainWindow): else: self.playlist.insertItem(index, filePath) - def openFile(self, filePath, resetPosition=False): - self._syncplayClient._player.openFile(filePath, resetPosition) + def openFile(self, filePath, resetPosition=False, fromUser=False): + self._syncplayClient.openFile(filePath, resetPosition, fromUser=fromUser) def noPlaylistDuplicates(self, filename): if self.isItemInPlaylist(filename): From 143df6c999bfba02efcb628907ebed22a121fbfb Mon Sep 17 00:00:00 2001 From: et0h Date: Sun, 18 Aug 2019 23:50:26 +0100 Subject: [PATCH 064/105] Allow managed room password to be specified in name (after : separator) (#216) --- syncplay/__init__.py | 2 +- syncplay/client.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/syncplay/__init__.py b/syncplay/__init__.py index d544005..051f38a 100755 --- a/syncplay/__init__.py +++ b/syncplay/__init__.py @@ -1,5 +1,5 @@ version = '1.6.5' revision = ' development' milestone = 'Yoitsu' -release_number = '82' +release_number = '83' projectURL = 'https://syncplay.pl/' diff --git a/syncplay/client.py b/syncplay/client.py index 36b86ed..c6d9885 100755 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -645,6 +645,12 @@ class SyncplayClient(object): return features def setRoom(self, roomName, resetAutoplay=False): + roomSplit = roomName.split(":") + if roomName.startswith("+") and len(roomSplit) > 2: + roomName = roomSplit[0] + ":" + roomSplit[1] + password = roomSplit[2] + self.storeControlPassword(roomName, password) + self.ui.updateRoomName(roomName) self.userlist.currentUser.room = roomName if resetAutoplay: self.resetAutoPlayState() @@ -657,6 +663,7 @@ class SyncplayClient(object): self.reIdentifyAsController() def reIdentifyAsController(self): + self.setRoom(self.userlist.currentUser.room) room = self.userlist.currentUser.room if utils.RoomPasswordProvider.isControlledRoom(room): storedRoomPassword = self.getControlledRoomPassword(room) From 7d694797aa799134efbb3f72112ac065e85c72d0 Mon Sep 17 00:00:00 2001 From: et0h Date: Mon, 19 Aug 2019 17:43:21 +0100 Subject: [PATCH 065/105] Add load/save playlist from/to file menu options --- syncplay/client.py | 6 ++++++ syncplay/messages_de.py | 2 ++ syncplay/messages_en.py | 2 ++ syncplay/messages_es.py | 2 ++ syncplay/messages_it.py | 2 ++ syncplay/messages_ru.py | 2 ++ syncplay/ui/gui.py | 45 +++++++++++++++++++++++++++++++++++++++++ 7 files changed, 61 insertions(+) diff --git a/syncplay/client.py b/syncplay/client.py index c6d9885..b253d0d 100755 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -1730,6 +1730,12 @@ class SyncplayPlaylist(): if newPlaylist: self.changePlaylist(newPlaylist, username=None, resetIndex=True) + def savePlaylistToFile(self, path): + with open(path, 'w') as playlistFile: + playlistToSave = utils.getListAsMultilineString(self._playlist) + playlistFile.write(playlistToSave) + self._ui.showMessage("Playlist saved as {}".format(path)) # TODO: Move to messages_en + def changePlaylist(self, files, username=None, resetIndex=False): if self._playlist == files: diff --git a/syncplay/messages_de.py b/syncplay/messages_de.py index e415256..9207d67 100755 --- a/syncplay/messages_de.py +++ b/syncplay/messages_de.py @@ -297,6 +297,8 @@ de = { "openmedia-menu-label": "&Mediendatei öffnen...", "openstreamurl-menu-label": "&Stream URL öffnen", "setmediadirectories-menu-label": "Set media &directories", # TODO: Translate + "loadplaylistfromfile-menu-label": "&Load playlist from file", # TODO: Translate + "saveplaylisttofile-menu-label": "&Save playlist to file", # TODO: Translate "exit-menu-label": "&Beenden", "advanced-menu-label": "&Erweitert", "window-menu-label": "&Fenster", diff --git a/syncplay/messages_en.py b/syncplay/messages_en.py index 113a780..1b2d96e 100755 --- a/syncplay/messages_en.py +++ b/syncplay/messages_en.py @@ -299,6 +299,8 @@ en = { "openmedia-menu-label": "&Open media file", "openstreamurl-menu-label": "Open &media stream URL", "setmediadirectories-menu-label": "Set media &directories", + "loadplaylistfromfile-menu-label": "&Load playlist from file", + "saveplaylisttofile-menu-label": "&Save playlist to file", "exit-menu-label": "E&xit", "advanced-menu-label": "&Advanced", "window-menu-label": "&Window", diff --git a/syncplay/messages_es.py b/syncplay/messages_es.py index 1625574..e216d35 100644 --- a/syncplay/messages_es.py +++ b/syncplay/messages_es.py @@ -299,6 +299,8 @@ es = { "openmedia-menu-label": "A&brir archivo multimedia", "openstreamurl-menu-label": "Abrir URL de &flujo de medios", "setmediadirectories-menu-label": "&Establecer directorios de medios", + "loadplaylistfromfile-menu-label": "&Load playlist from file", # TODO: Translate + "saveplaylisttofile-menu-label": "&Save playlist to file", # TODO: Translate "exit-menu-label": "&Salir", "advanced-menu-label": "A&vanzado", "window-menu-label": "&Ventana", diff --git a/syncplay/messages_it.py b/syncplay/messages_it.py index 23f8d77..ee18fbd 100755 --- a/syncplay/messages_it.py +++ b/syncplay/messages_it.py @@ -299,6 +299,8 @@ it = { "openmedia-menu-label": "&Apri file multimediali", "openstreamurl-menu-label": "Apri indirizzo di &rete", "setmediadirectories-menu-label": "Imposta &cartelle multimediali", + "loadplaylistfromfile-menu-label": "&Load playlist from file", # TODO: Translate + "saveplaylisttofile-menu-label": "&Save playlist to file", # TODO: Translate "exit-menu-label": "&Esci", "advanced-menu-label": "&Avanzate", "window-menu-label": "&Finestra", diff --git a/syncplay/messages_ru.py b/syncplay/messages_ru.py index cb9b026..5c0dc19 100755 --- a/syncplay/messages_ru.py +++ b/syncplay/messages_ru.py @@ -301,6 +301,8 @@ ru = { "openmedia-menu-label": "&Открыть файл", "openstreamurl-menu-label": "Открыть &ссылку", "setmediadirectories-menu-label": "&Папки воспроизведения", + "loadplaylistfromfile-menu-label": "&Load playlist from file", # TODO: Translate + "saveplaylisttofile-menu-label": "&Save playlist to file", # TODO: Translate "exit-menu-label": "&Выход", "advanced-menu-label": "&Дополнительно", "window-menu-label": "&Вид", diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index cfb233b..27dcb87 100755 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -711,6 +711,10 @@ class MainWindow(QtWidgets.QMainWindow): menu.addAction(QtGui.QPixmap(resourcespath + "film_add.png"), getMessage("addfilestoplaylist-menu-label"), lambda: self.OpenAddFilesToPlaylistDialog()) menu.addAction(QtGui.QPixmap(resourcespath + "world_add.png"), getMessage("addurlstoplaylist-menu-label"), lambda: self.OpenAddURIsToPlaylistDialog()) menu.addSeparator() + menu.addAction(getMessage("loadplaylistfromfile-menu-label"),lambda: self.OpenLoadPlaylistFromFileDialog()) # TODO: Add icon + menu.addAction("Load and shuffle playlist from file",lambda: self.OpenLoadPlaylistFromFileDialog(shuffle=True)) # TODO: Add icon and messages_en + menu.addAction(getMessage("saveplaylisttofile-menu-label"),lambda: self.OpenSavePlaylistToFileDialog()) # TODO: Add icon + menu.addSeparator() menu.addAction(QtGui.QPixmap(resourcespath + "film_folder_edit.png"), getMessage("setmediadirectories-menu-label"), lambda: self.openSetMediaDirectoriesDialog()) menu.addAction(QtGui.QPixmap(resourcespath + "shield_edit.png"), getMessage("settrusteddomains-menu-label"), lambda: self.openSetTrustedDomainsDialog()) menu.exec_(self.playlist.viewport().mapToGlobal(position)) @@ -1041,6 +1045,47 @@ class MainWindow(QtWidgets.QMainWindow): self.updatingPlaylist = False self.playlist.updatePlaylist(self.getPlaylistState()) + @needsClient + def OpenLoadPlaylistFromFileDialog(self, shuffle=False): + self.loadMediaBrowseSettings() + if isMacOS() and IsPySide: + options = QtWidgets.QFileDialog.Options(QtWidgets.QFileDialog.DontUseNativeDialog) + else: + options = QtWidgets.QFileDialog.Options() + self.mediadirectory = "" + currentdirectory = os.path.dirname(self._syncplayClient.userlist.currentUser.file["path"]) if self._syncplayClient.userlist.currentUser.file else None + if currentdirectory and os.path.isdir(currentdirectory): + defaultdirectory = currentdirectory + else: + defaultdirectory = self.getInitialMediaDirectory() + browserfilter = "Playlists (*.m3u *.m3u8 *.txt)" + filepath, filtr = QtWidgets.QFileDialog.getOpenFileName( + self, "Load playlist from file", defaultdirectory, + browserfilter, "", options) # TODO: Note Shuffle and move to messages_en + if os.path.isfile(filepath): + self._syncplayClient.playlist.loadPlaylistFromFile(filepath, shuffle=shuffle) + self.playlist.updatePlaylist(self.getPlaylistState()) + + @needsClient + def OpenSavePlaylistToFileDialog(self): + self.loadMediaBrowseSettings() + if isMacOS() and IsPySide: + options = QtWidgets.QFileDialog.Options(QtWidgets.QFileDialog.DontUseNativeDialog) + else: + options = QtWidgets.QFileDialog.Options() + self.mediadirectory = "" + currentdirectory = os.path.dirname(self._syncplayClient.userlist.currentUser.file["path"]) if self._syncplayClient.userlist.currentUser.file else None + if currentdirectory and os.path.isdir(currentdirectory): + defaultdirectory = currentdirectory + else: + defaultdirectory = self.getInitialMediaDirectory() + browserfilter = "Playlist (*.m3u8 *.m3u *.txt)" + filepath, filtr = QtWidgets.QFileDialog.getSaveFileName( + self, "Save playlist to file", defaultdirectory, + browserfilter, "", options) # TODO: Move to messages_en + if filepath: + self._syncplayClient.playlist.savePlaylistToFile(filepath) + @needsClient def OpenAddURIsToPlaylistDialog(self): URIsDialog = QtWidgets.QDialog() From 571326d501e39137d45b3db0af9fbd04ed5a3e3b Mon Sep 17 00:00:00 2001 From: et0h Date: Mon, 19 Aug 2019 17:45:21 +0100 Subject: [PATCH 066/105] Don't try to load playlist file that does not exist --- syncplay/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/syncplay/client.py b/syncplay/client.py index b253d0d..3f2c7a9 100755 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -1723,6 +1723,10 @@ class SyncplayPlaylist(): return filename def loadPlaylistFromFile(self, path, shuffle=False): + if not os.path.isfile(path): + self._ui.showDebugMessage("Not loading {} as file could not be found".format(path)) + return + with open(path) as f: newPlaylist = f.read().splitlines() if shuffle: From 84ebddd08720b503f6a6d2f1fe8ac814d52ff698 Mon Sep 17 00:00:00 2001 From: et0h Date: Mon, 19 Aug 2019 18:03:38 +0100 Subject: [PATCH 067/105] Include all .ico files in zip/.exe --- buildPy2exe.py | 3 +-- syncplay/__init__.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/buildPy2exe.py b/buildPy2exe.py index dc5b4c6..d972554 100755 --- a/buildPy2exe.py +++ b/buildPy2exe.py @@ -670,10 +670,9 @@ class build_installer(py2exe): script.compile() print("*** DONE ***") -guiIcons = glob('syncplay/resources/*.png') + ['syncplay/resources/spinner.mng'] +guiIcons = glob('syncplay/resources/*.ico') + glob('syncplay/resources/*.png') + ['syncplay/resources/spinner.mng'] resources = [ - "syncplay/resources/icon.ico", "syncplay/resources/syncplayintf.lua", "syncplay/resources/license.rtf", "syncplay/resources/third-party-notices.rtf" diff --git a/syncplay/__init__.py b/syncplay/__init__.py index 051f38a..da83232 100755 --- a/syncplay/__init__.py +++ b/syncplay/__init__.py @@ -1,5 +1,5 @@ version = '1.6.5' revision = ' development' milestone = 'Yoitsu' -release_number = '83' +release_number = '84' projectURL = 'https://syncplay.pl/' From 8bd80d046a11f55e0119538d88f726029af49db1 Mon Sep 17 00:00:00 2001 From: Benjamin O Date: Mon, 18 Nov 2019 12:51:05 -0500 Subject: [PATCH 068/105] Remove some odd locations for icons (#249) --- GNUmakefile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index d68b634..26e75a3 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -37,22 +37,16 @@ endif common: -mkdir -p $(LIB_PATH)/syncplay/syncplay/resources/lua/intf -mkdir -p $(APP_SHORTCUT_PATH) - -mkdir -p $(SHARE_PATH)/app-install/icons - -mkdir -p $(SHARE_PATH)/pixmaps/ cp -r syncplay $(LIB_PATH)/syncplay/ chmod 755 $(LIB_PATH)/syncplay/ cp -r syncplay/resources/hicolor $(SHARE_PATH)/icons/ cp -r syncplay/resources/*.png $(LIB_PATH)/syncplay/syncplay/resources/ cp -r syncplay/resources/*.lua $(LIB_PATH)/syncplay/syncplay/resources/ cp -r syncplay/resources/lua/intf/*.lua $(LIB_PATH)/syncplay/syncplay/resources/lua/intf/ - cp syncplay/resources/hicolor/48x48/apps/syncplay.png $(SHARE_PATH)/app-install/icons/ - cp syncplay/resources/hicolor/48x48/apps/syncplay.png $(SHARE_PATH)/pixmaps/ u-common: -rm -rf $(LIB_PATH)/syncplay -rm $(SHARE_PATH)/icons/hicolor/*/apps/syncplay.png - -rm $(SHARE_PATH)/app-install/icons/syncplay.png - -rm $(SHARE_PATH)/pixmaps/syncplay.png client: -mkdir -p $(BIN_PATH) From bf5c8dd531a5c88479d17f290ec8bdfda425b12a Mon Sep 17 00:00:00 2001 From: ObserverOfTime Date: Mon, 30 Dec 2019 14:56:27 +0200 Subject: [PATCH 069/105] Fix string equality checks (#267) --- buildPy2exe.py | 4 ++-- syncplay/client.py | 2 +- syncplay/ui/GuiConfiguration.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/buildPy2exe.py b/buildPy2exe.py index d972554..84c357e 100755 --- a/buildPy2exe.py +++ b/buildPy2exe.py @@ -30,7 +30,7 @@ import syncplay from syncplay.messages import getMissingStrings missingStrings = getMissingStrings() -if missingStrings is not None and missingStrings is not "": +if missingStrings is not None and missingStrings != "": import warnings warnings.warn("MISSING/UNUSED STRINGS DETECTED:\n{}".format(missingStrings)) @@ -718,4 +718,4 @@ info = dict( ) sys.argv.extend(['py2exe']) -setup(**info) \ No newline at end of file +setup(**info) diff --git a/syncplay/client.py b/syncplay/client.py index 3f2c7a9..e6d7934 100755 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -135,7 +135,7 @@ class SyncplayClient(object): if constants.DEBUG_MODE and constants.WARN_ABOUT_MISSING_STRINGS: missingStrings = getMissingStrings() - if missingStrings is not None and missingStrings is not "": + if missingStrings is not None and missingStrings != "": self.ui.showDebugMessage("MISSING/UNUSED STRINGS DETECTED:\n{}".format(missingStrings)) def initProtocol(self, protocol): diff --git a/syncplay/ui/GuiConfiguration.py b/syncplay/ui/GuiConfiguration.py index f062707..ee0f0a8 100755 --- a/syncplay/ui/GuiConfiguration.py +++ b/syncplay/ui/GuiConfiguration.py @@ -320,7 +320,7 @@ class ConfigDialog(QtWidgets.QDialog): try: self.lastCheckedForUpdates = settings.value("lastCheckedQt", None) if self.lastCheckedForUpdates: - if self.config["lastCheckedForUpdates"] is not None and self.config["lastCheckedForUpdates"] is not "": + if self.config["lastCheckedForUpdates"] is not None and self.config["lastCheckedForUpdates"] != "": if self.lastCheckedForUpdates.toPython() > datetime.strptime(self.config["lastCheckedForUpdates"], "%Y-%m-%d %H:%M:%S.%f"): self.config["lastCheckedForUpdates"] = self.lastCheckedForUpdates.toString("yyyy-MM-d HH:mm:ss.z") else: From 608203e0eee4f37b064c5e4c4a3735a55bd3bac5 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sat, 14 Mar 2020 13:53:07 +0000 Subject: [PATCH 070/105] Add build status badges --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 383d097..2b29916 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,9 @@ # SOFTWARE. --> -# Syncplay +# Syncplay +[![Travis build Status](https://travis-ci.org/Syncplay/syncplay.svg?branch=master)](https://travis-ci.org/Syncplay/syncplay) +[![Appveyor build status](https://ci.appveyor.com/api/projects/status/github/Syncplay/syncplay)](https://ci.appveyor.com/project/Et0h/syncplay/branch/master) Solution to synchronize video playback across multiple instances of mpv, VLC, MPC-HC, MPC-BE and mplayer2 over the Internet. From 8720e6341522754c139639992fb0f6e6ea0c4bc9 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sat, 14 Mar 2020 14:06:34 +0000 Subject: [PATCH 071/105] Workaround for OSX deploy issues --- travis/macos-deploy.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/travis/macos-deploy.sh b/travis/macos-deploy.sh index 2b192b9..91dfe4a 100755 --- a/travis/macos-deploy.sh +++ b/travis/macos-deploy.sh @@ -11,3 +11,9 @@ mkdir dist/Syncplay.app/Contents/Resources/es_419.lproj pip3 install dmgbuild mv syncplay/resources/macOS_readme.pdf syncplay/resources/.macOS_readme.pdf dmgbuild -s appdmg.py "Syncplay" dist_bintray/Syncplay_${VER}.dmg + +# Workaround for deployment issues with newer openssl. +# See https://travis-ci.community/t/ruby-openssl-python-deployment-fails-on-osx-image/6753/9 +for lib in ssl crypto; do ln -s /usr/local/opt/openssl{@1.0,}/lib/lib${lib}.1.0.0.dylib; done +rvm reinstall $(travis_internal_ruby) --disable-binary +for lib in ssl crypto; do rm /usr/local/opt/openssl/lib/lib${lib}.1.0.0.dylib; done From e9a74fab13a0f8b29b5e6f13aef5aff3a0a93c81 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sat, 14 Mar 2020 14:16:37 +0000 Subject: [PATCH 072/105] Homebrew already has python 3 installed, so don't need to update --- travis/macos-install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index 78b6425..580ed1d 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -1,7 +1,5 @@ #!/usr/bin/env bash -brew update -brew upgrade python which python3 python3 --version which pip3 From 94637bb65d900ade830f24c65336b04f58bc707c Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sat, 14 Mar 2020 14:24:35 +0000 Subject: [PATCH 073/105] Skip the openssl workaround now we're no longer upgrading openssl --- travis/macos-deploy.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/travis/macos-deploy.sh b/travis/macos-deploy.sh index 91dfe4a..97214e9 100755 --- a/travis/macos-deploy.sh +++ b/travis/macos-deploy.sh @@ -10,10 +10,4 @@ mkdir dist/Syncplay.app/Contents/Resources/Spanish.lproj mkdir dist/Syncplay.app/Contents/Resources/es_419.lproj pip3 install dmgbuild mv syncplay/resources/macOS_readme.pdf syncplay/resources/.macOS_readme.pdf -dmgbuild -s appdmg.py "Syncplay" dist_bintray/Syncplay_${VER}.dmg - -# Workaround for deployment issues with newer openssl. -# See https://travis-ci.community/t/ruby-openssl-python-deployment-fails-on-osx-image/6753/9 -for lib in ssl crypto; do ln -s /usr/local/opt/openssl{@1.0,}/lib/lib${lib}.1.0.0.dylib; done -rvm reinstall $(travis_internal_ruby) --disable-binary -for lib in ssl crypto; do rm /usr/local/opt/openssl/lib/lib${lib}.1.0.0.dylib; done +dmgbuild -s appdmg.py "Syncplay" dist_bintray/Syncplay_${VER}.dmg \ No newline at end of file From c4fa7f7a9aaf39c9349bd0d2ec4a3bf439a3bc35 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sat, 14 Mar 2020 17:21:23 +0000 Subject: [PATCH 074/105] Redo travis config in line with modern options --- .travis.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 167bfb3..b245471 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,22 @@ -matrix: +# These two are defaults, which get overriden by the jobs matrix +language: minimal +os: linux + +jobs: include: - language: objective-c + os: osx osx_image: xcode8.3 - language: bash - sudo: required dist: xenial + os: linux env: BUILD_DESTINATION=snapcraft - language: python - sudo: required + os: linux dist: xenial python: 3.6 env: BUILD_DESTINATION=appimage -branches: - only: - - master - script: - if [ "$TRAVIS_OS_NAME" == "osx" ]; then python3 buildPy2app.py py2app ; fi - if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_DESTINATION" == "snapcraft" ]; then sudo snapcraft cleanbuild ; fi From a93f13f9abb1e169a14b3382bd851af5a615505e Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sat, 14 Mar 2020 17:24:48 +0000 Subject: [PATCH 075/105] Explicitly install Python from homebrew --- travis/macos-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index 580ed1d..061e0a7 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash +brew install python which python3 python3 --version which pip3 From 6f6f35704e1139364f8e2c9c9cf2aef46eb9df63 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sat, 14 Mar 2020 17:25:24 +0000 Subject: [PATCH 076/105] Bash is alias for minimal --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b245471..13e3617 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ jobs: - language: objective-c os: osx osx_image: xcode8.3 - - language: bash + - language: minimal dist: xenial os: linux env: BUILD_DESTINATION=snapcraft From 6faf25b9481d9baab5ae7844110b56fdbb26f570 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sat, 14 Mar 2020 17:32:36 +0000 Subject: [PATCH 077/105] Explicitly install Python 3 --- travis/macos-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index 061e0a7..ad17e25 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -brew install python +brew install python3 which python3 python3 --version which pip3 From afaad1f766ae9e5a88d44bb8fe255fe98e99bf21 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sat, 14 Mar 2020 17:34:01 +0000 Subject: [PATCH 078/105] If any part of the osx install fails, stop --- travis/macos-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index ad17e25..1e873c9 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -e + brew install python3 which python3 python3 --version From b6e17e08f09dbf01c603f39b602ba3d83d08d806 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sat, 14 Mar 2020 17:41:56 +0000 Subject: [PATCH 079/105] Use stock pyside --- travis/macos-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index 1e873c9..3ffea03 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash -set -e +set -ex brew install python3 which python3 python3 --version which pip3 pip3 --version -brew install albertosottile/syncplay/pyside +brew install pyside python3 -c "from PySide2 import __version__; print(__version__)" python3 -c "from PySide2.QtCore import __version__; print(__version__)" pip3 install py2app From a4e84ac65c9d97c707a03e8a0be8fd5aae353cd7 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sat, 14 Mar 2020 17:45:45 +0000 Subject: [PATCH 080/105] Re-add brew update --- travis/macos-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index 3ffea03..51dd1ac 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -2,6 +2,7 @@ set -ex +brew update brew install python3 which python3 python3 --version From 41d0152f2845088db4245489845d6b8bf0125bfa Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sat, 14 Mar 2020 18:01:28 +0000 Subject: [PATCH 081/105] Go back to upgrading python... --- travis/macos-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index 51dd1ac..2da30ef 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -2,8 +2,9 @@ set -ex +export HOMEBREW_NO_INSTALL_CLEANUP=1 brew update -brew install python3 +brew upgrade python which python3 python3 --version which pip3 From baec200c8cda21a9c4333369084a27dc5cc5822f Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sat, 14 Mar 2020 18:01:58 +0000 Subject: [PATCH 082/105] Revert "Skip the openssl workaround now we're no longer upgrading openssl" This reverts commit 94637bb65d900ade830f24c65336b04f58bc707c. --- travis/macos-deploy.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/travis/macos-deploy.sh b/travis/macos-deploy.sh index 97214e9..91dfe4a 100755 --- a/travis/macos-deploy.sh +++ b/travis/macos-deploy.sh @@ -10,4 +10,10 @@ mkdir dist/Syncplay.app/Contents/Resources/Spanish.lproj mkdir dist/Syncplay.app/Contents/Resources/es_419.lproj pip3 install dmgbuild mv syncplay/resources/macOS_readme.pdf syncplay/resources/.macOS_readme.pdf -dmgbuild -s appdmg.py "Syncplay" dist_bintray/Syncplay_${VER}.dmg \ No newline at end of file +dmgbuild -s appdmg.py "Syncplay" dist_bintray/Syncplay_${VER}.dmg + +# Workaround for deployment issues with newer openssl. +# See https://travis-ci.community/t/ruby-openssl-python-deployment-fails-on-osx-image/6753/9 +for lib in ssl crypto; do ln -s /usr/local/opt/openssl{@1.0,}/lib/lib${lib}.1.0.0.dylib; done +rvm reinstall $(travis_internal_ruby) --disable-binary +for lib in ssl crypto; do rm /usr/local/opt/openssl/lib/lib${lib}.1.0.0.dylib; done From 81024f3c066675b0a1c85c0ce588a5707e384531 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sat, 14 Mar 2020 19:40:27 +0000 Subject: [PATCH 083/105] Upgrade to xcode 9.2 (still OSX 10.12) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 13e3617..cfcf6d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ jobs: include: - language: objective-c os: osx - osx_image: xcode8.3 + osx_image: xcode9.2 - language: minimal dist: xenial os: linux From 2dfddda85f4066e5659587f3da89b9421696b8ed Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sat, 14 Mar 2020 23:41:04 +0000 Subject: [PATCH 084/105] Try installing python via Travis homebrew addon --- .travis.yml | 5 +++++ travis/macos-install.sh | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index cfcf6d6..59609ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,11 @@ jobs: - language: objective-c os: osx osx_image: xcode9.2 + addons: + homebrew: + packages: + - python + update: true - language: minimal dist: xenial os: linux diff --git a/travis/macos-install.sh b/travis/macos-install.sh index 2da30ef..f7b55ac 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -2,9 +2,6 @@ set -ex -export HOMEBREW_NO_INSTALL_CLEANUP=1 -brew update -brew upgrade python which python3 python3 --version which pip3 From d297c7af776b43352edcaf9ed6856e0ce8f4b96d Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sun, 15 Mar 2020 00:00:01 +0000 Subject: [PATCH 085/105] Pull install back into scripting --- .travis.yml | 5 ----- travis/macos-install.sh | 9 +++++++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 59609ea..cfcf6d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,11 +7,6 @@ jobs: - language: objective-c os: osx osx_image: xcode9.2 - addons: - homebrew: - packages: - - python - update: true - language: minimal dist: xenial os: linux diff --git a/travis/macos-install.sh b/travis/macos-install.sh index f7b55ac..8d358c4 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -2,6 +2,15 @@ set -ex +export HOMEBREW_NO_INSTALL_CLEANUP=1 +brew update + +# An error occurs when upgrading Python, but appears to be benign, hence the "|| true" +# +# Error: undefined method `any?' for nil:NilClass +# /usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:227:in `depends_on' +brew upgrade python || true + which python3 python3 --version which pip3 From f85741988d4a1bb91ceb84d73b4a79e97ae23931 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sun, 15 Mar 2020 10:35:54 +0000 Subject: [PATCH 086/105] Reset back to custom tap pyside --- travis/macos-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index 8d358c4..d35618c 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -15,7 +15,7 @@ which python3 python3 --version which pip3 pip3 --version -brew install pyside +brew install albertosottile/syncplay/pyside python3 -c "from PySide2 import __version__; print(__version__)" python3 -c "from PySide2.QtCore import __version__; print(__version__)" pip3 install py2app From 1ab7c0e209fe0c98f00c39b93d698ce97dc2bdcd Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sun, 15 Mar 2020 11:53:09 +0000 Subject: [PATCH 087/105] Explicitly install Qt 5.13.1 --- travis/macos-install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index d35618c..c4edb10 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -15,6 +15,10 @@ which python3 python3 --version which pip3 pip3 --version + +# Explicitly install Qt 5.13.1 as that has both 10.12 compatibility, and a pre-built bottle +brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/dcc34dd3cb24cb4f7cfa0047ccdb712d7cc4c6e4/Formula/qt.rb + brew install albertosottile/syncplay/pyside python3 -c "from PySide2 import __version__; print(__version__)" python3 -c "from PySide2.QtCore import __version__; print(__version__)" From bc7471fc20cd4d52f59f13823ea76aa7f62f4857 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sun, 15 Mar 2020 12:02:39 +0000 Subject: [PATCH 088/105] Install a explicit particular Python version --- travis/macos-install.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index c4edb10..7d71a92 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -3,20 +3,16 @@ set -ex export HOMEBREW_NO_INSTALL_CLEANUP=1 -brew update -# An error occurs when upgrading Python, but appears to be benign, hence the "|| true" -# -# Error: undefined method `any?' for nil:NilClass -# /usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:227:in `depends_on' -brew upgrade python || true +# Python 3.7.4 with 10.12 bottle +brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/e9004bd764c9436750a50e0b428548f68fe6a38a/Formula/python.rb which python3 python3 --version which pip3 pip3 --version -# Explicitly install Qt 5.13.1 as that has both 10.12 compatibility, and a pre-built bottle +# Explicitly install Qt 5.13.1 as that has both 10.12 compatibility, and a pre-built bottle brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/dcc34dd3cb24cb4f7cfa0047ccdb712d7cc4c6e4/Formula/qt.rb brew install albertosottile/syncplay/pyside From 68ca4c1b6050b47821c51e13abee4e1e631ff503 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sun, 15 Mar 2020 12:06:26 +0000 Subject: [PATCH 089/105] Need to explicitly upgrade Python --- travis/macos-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index 7d71a92..e67d879 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -5,7 +5,7 @@ set -ex export HOMEBREW_NO_INSTALL_CLEANUP=1 # Python 3.7.4 with 10.12 bottle -brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/e9004bd764c9436750a50e0b428548f68fe6a38a/Formula/python.rb +brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/e9004bd764c9436750a50e0b428548f68fe6a38a/Formula/python.rb which python3 python3 --version From 749babd8f9b590144de2fbf62720e0a76d030a0e Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sun, 15 Mar 2020 12:09:32 +0000 Subject: [PATCH 090/105] Remove Qt install --- travis/macos-install.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index e67d879..b6a78f6 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -12,9 +12,6 @@ python3 --version which pip3 pip3 --version -# Explicitly install Qt 5.13.1 as that has both 10.12 compatibility, and a pre-built bottle -brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/dcc34dd3cb24cb4f7cfa0047ccdb712d7cc4c6e4/Formula/qt.rb - brew install albertosottile/syncplay/pyside python3 -c "from PySide2 import __version__; print(__version__)" python3 -c "from PySide2.QtCore import __version__; print(__version__)" From 1358826b2691ed429a1f95e290be43aacde6ebde Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sun, 15 Mar 2020 12:13:14 +0000 Subject: [PATCH 091/105] Upgrade Qt version after the pyside install --- travis/macos-install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index b6a78f6..ec01e3d 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -13,6 +13,10 @@ which pip3 pip3 --version brew install albertosottile/syncplay/pyside + +# Explicitly install Qt 5.13.1 as that has both 10.12 compatibility, and a pre-built bottle +brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/dcc34dd3cb24cb4f7cfa0047ccdb712d7cc4c6e4/Formula/qt.rb + python3 -c "from PySide2 import __version__; print(__version__)" python3 -c "from PySide2.QtCore import __version__; print(__version__)" pip3 install py2app From a3f1daee064d9b3a8f46b13fd63de052ed874f63 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sun, 15 Mar 2020 12:17:06 +0000 Subject: [PATCH 092/105] Switch to upstream pyside --- travis/macos-install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index ec01e3d..dd95f7c 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -12,10 +12,11 @@ python3 --version which pip3 pip3 --version -brew install albertosottile/syncplay/pyside - # Explicitly install Qt 5.13.1 as that has both 10.12 compatibility, and a pre-built bottle -brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/dcc34dd3cb24cb4f7cfa0047ccdb712d7cc4c6e4/Formula/qt.rb +brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/dcc34dd3cb24cb4f7cfa0047ccdb712d7cc4c6e4/Formula/qt.rb + +# Pyside 5.13.0 for 10.12 bottle +brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/99219f0923014b24f33eae624fbfe83772c35f54/Formula/pyside.rb python3 -c "from PySide2 import __version__; print(__version__)" python3 -c "from PySide2.QtCore import __version__; print(__version__)" From 7cc5b6cc6f0824d2cef02cf6d4bd32d0d1adb300 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sun, 15 Mar 2020 12:21:59 +0000 Subject: [PATCH 093/105] Pyside needs Qt 5.13, but installs 5.9 for some reason --- travis/macos-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index dd95f7c..94ff084 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -12,12 +12,12 @@ python3 --version which pip3 pip3 --version -# Explicitly install Qt 5.13.1 as that has both 10.12 compatibility, and a pre-built bottle -brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/dcc34dd3cb24cb4f7cfa0047ccdb712d7cc4c6e4/Formula/qt.rb - # Pyside 5.13.0 for 10.12 bottle brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/99219f0923014b24f33eae624fbfe83772c35f54/Formula/pyside.rb +# Explicitly upgrade Qt 5.13.1 as the pyside above needs it +brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/dcc34dd3cb24cb4f7cfa0047ccdb712d7cc4c6e4/Formula/qt.rb + python3 -c "from PySide2 import __version__; print(__version__)" python3 -c "from PySide2.QtCore import __version__; print(__version__)" pip3 install py2app From 0505cc247ef5c62130a6f67d6943a9826d025c9c Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sun, 15 Mar 2020 12:34:27 +0000 Subject: [PATCH 094/105] Upgrade openssl --- travis/macos-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index 94ff084..987dbb5 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -5,6 +5,7 @@ set -ex export HOMEBREW_NO_INSTALL_CLEANUP=1 # Python 3.7.4 with 10.12 bottle +brew install openssl@1.1 brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/e9004bd764c9436750a50e0b428548f68fe6a38a/Formula/python.rb which python3 From f53f4d3b81e2f2d57efc59214d336237086f05d7 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sun, 15 Mar 2020 12:40:15 +0000 Subject: [PATCH 095/105] Reinstall openssl --- travis/macos-install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index 987dbb5..f1a88d0 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -5,9 +5,11 @@ set -ex export HOMEBREW_NO_INSTALL_CLEANUP=1 # Python 3.7.4 with 10.12 bottle -brew install openssl@1.1 brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/e9004bd764c9436750a50e0b428548f68fe6a38a/Formula/python.rb +# Reinstall openssl to fix Python pip install issues +brew reinstall openssl@1.1 + which python3 python3 --version which pip3 @@ -21,6 +23,7 @@ brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/dcc34dd3cb python3 -c "from PySide2 import __version__; print(__version__)" python3 -c "from PySide2.QtCore import __version__; print(__version__)" +python3 -c "import ssl; print(ssl)" pip3 install py2app python3 -c "from py2app.recipes import pyside2" pip3 install twisted[tls] appnope requests certifi From ff8e16976cbc3e28b2358c171e7c177b0c34fa46 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sun, 15 Mar 2020 12:49:28 +0000 Subject: [PATCH 096/105] Reinstall openssl, then install Python --- travis/macos-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index f1a88d0..ec8b626 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -4,12 +4,12 @@ set -ex export HOMEBREW_NO_INSTALL_CLEANUP=1 -# Python 3.7.4 with 10.12 bottle -brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/e9004bd764c9436750a50e0b428548f68fe6a38a/Formula/python.rb - # Reinstall openssl to fix Python pip install issues brew reinstall openssl@1.1 +# Python 3.7.4 with 10.12 bottle +brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/e9004bd764c9436750a50e0b428548f68fe6a38a/Formula/python.rb + which python3 python3 --version which pip3 From 135d34b37dcf614054c7d043031a2574351833fe Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sun, 15 Mar 2020 12:54:59 +0000 Subject: [PATCH 097/105] Install openssl version in line with Python version --- travis/macos-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/macos-install.sh b/travis/macos-install.sh index ec8b626..3d688da 100755 --- a/travis/macos-install.sh +++ b/travis/macos-install.sh @@ -5,7 +5,7 @@ set -ex export HOMEBREW_NO_INSTALL_CLEANUP=1 # Reinstall openssl to fix Python pip install issues -brew reinstall openssl@1.1 +brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/e9004bd764c9436750a50e0b428548f68fe6a38a/Formula/openssl@1.1.rb # Python 3.7.4 with 10.12 bottle brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/e9004bd764c9436750a50e0b428548f68fe6a38a/Formula/python.rb From 6588d12cb7aca94e9253f104300ff9612fa492ad Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sun, 15 Mar 2020 12:59:29 +0000 Subject: [PATCH 098/105] Drop Xcode back to 8.3 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cfcf6d6..13e3617 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ jobs: include: - language: objective-c os: osx - osx_image: xcode9.2 + osx_image: xcode8.3 - language: minimal dist: xenial os: linux From 10dfcb5db8e1fa027fbc73ea7f9cdd7cfe1bdda6 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sun, 22 Mar 2020 16:59:02 +0000 Subject: [PATCH 099/105] Remove ruby reinstall workaround for openssl, as not needed --- travis/macos-deploy.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/travis/macos-deploy.sh b/travis/macos-deploy.sh index 91dfe4a..08c74ba 100755 --- a/travis/macos-deploy.sh +++ b/travis/macos-deploy.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -ex + mkdir dist/Syncplay.app/Contents/Resources/English.lproj mkdir dist/Syncplay.app/Contents/Resources/en_AU.lproj mkdir dist/Syncplay.app/Contents/Resources/en_GB.lproj @@ -11,9 +13,3 @@ mkdir dist/Syncplay.app/Contents/Resources/es_419.lproj pip3 install dmgbuild mv syncplay/resources/macOS_readme.pdf syncplay/resources/.macOS_readme.pdf dmgbuild -s appdmg.py "Syncplay" dist_bintray/Syncplay_${VER}.dmg - -# Workaround for deployment issues with newer openssl. -# See https://travis-ci.community/t/ruby-openssl-python-deployment-fails-on-osx-image/6753/9 -for lib in ssl crypto; do ln -s /usr/local/opt/openssl{@1.0,}/lib/lib${lib}.1.0.0.dylib; done -rvm reinstall $(travis_internal_ruby) --disable-binary -for lib in ssl crypto; do rm /usr/local/opt/openssl/lib/lib${lib}.1.0.0.dylib; done From 23ca271ff9dc19ad96c3eb0e34a56ebb5d7728d0 Mon Sep 17 00:00:00 2001 From: Viktor Date: Sun, 5 Apr 2020 14:04:17 +0200 Subject: [PATCH 100/105] German (de) translation update (#287) * Update German translation * Remove stray TODOs --- syncplay/messages_de.py | 282 ++++++++++++++++++++-------------------- 1 file changed, 141 insertions(+), 141 deletions(-) diff --git a/syncplay/messages_de.py b/syncplay/messages_de.py index 9207d67..d952b97 100755 --- a/syncplay/messages_de.py +++ b/syncplay/messages_de.py @@ -16,7 +16,7 @@ de = { "connection-failed-notification": "Verbindung zum Server fehlgeschlagen", "connected-successful-notification": "Erfolgreich mit Server verbunden", "retrying-notification": "%s, versuche erneut in %d Sekunden...", # Seconds - "reachout-successful-notification": "Successfully reached {} ({})", # TODO: Translate + "reachout-successful-notification": "{} ({}) erfolgreich erreicht", "rewind-notification": "Zurückgespult wegen Zeitdifferenz mit {}", # User "fastforward-notification": "Vorgespult wegen Zeitdifferenz mit {}", # User @@ -29,13 +29,13 @@ de = { "current-offset-notification": "Aktueller Offset: {} Sekunden", # Offset - "media-directory-list-updated-notification": "Syncplay media directories have been updated.", # TODO: Translate + "media-directory-list-updated-notification": "Syncplay-Medienverzeichnisse wurden aktualisiert.", - "room-join-notification": "{} hat den Raum '{}' betreten", # User + "room-join-notification": "{} hat den Raum „{}“ betreten", # User "left-notification": "{} ist gegangen", # User "left-paused-notification": "{} ist gegangen, {} pausierte", # User who left, User who paused - "playing-notification": "{} spielt '{}' ({})", # User, file, duration - "playing-notification/room-addendum": " in Raum: '{}'", # Room + "playing-notification": "{} spielt „{}“ ({})", # User, file, duration + "playing-notification/room-addendum": " in Raum: „{}“", # Room "not-all-ready": "Noch nicht bereit: {}", # Usernames "all-users-ready": "Alle sind bereit ({} Nutzer)", # Number of ready users @@ -44,10 +44,10 @@ de = { "set-as-not-ready-notification": "Du bist nicht bereit", "autoplaying-notification": "Starte in {}...", # Number of seconds until playback will start - "identifying-as-controller-notification": "Identifiziere als Raumleiter mit Passwort '{}'...", # TODO: find a better translation to "room operator" + "identifying-as-controller-notification": "Identifiziere als Raumleiter mit Passwort „{}“...", # TODO: find a better translation to "room operator" "failed-to-identify-as-controller-notification": "{} konnte sich nicht als Raumleiter identifizieren.", "authenticated-as-controller-notification": "{} authentifizierte sich als Raumleiter", - "created-controlled-room-notification": "Gesteuerten Raum '{}' mit Passwort '{}' erstellt. Bitte diese Informationen für die Zukunft aufheben!", # RoomName, operatorPassword + "created-controlled-room-notification": "Gesteuerten Raum „{}“ mit Passwort „{}“ erstellt. Bitte diese Informationen für die Zukunft aufheben!", # RoomName, operatorPassword "file-different-notification": "Deine Datei scheint sich von {}s zu unterscheiden", # User "file-differences-notification": "Deine Datei unterscheidet sich auf folgende Art: {}", @@ -62,7 +62,7 @@ de = { "file-played-by-notification": "Datei: {} wird gespielt von:", # File "no-file-played-notification": "{} spielt keine Datei ab", # Username "notplaying-notification": "Personen im Raum, die keine Dateien spielen:", - "userlist-room-notification": "In Raum '{}':", # Room + "userlist-room-notification": "In Raum „{}“:", # Room "userlist-file-notification": "Datei", "controller-userlist-userflag": "Raumleiter", "ready-userlist-userflag": "Bereit", @@ -86,7 +86,7 @@ de = { "commandlist-notification/toggle": "\tt - Bereitschaftsanzeige umschalten", "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] - send a chat message in a room", # TODO: Translate + "commandlist-notification/chat": "\tch [message] - Chatnachricht an einem Raum senden", "syncplay-version-notification": "Syncplay Version: {}", # syncplay.version "more-info-notification": "Weitere Informationen auf: {}", # projectURL @@ -108,18 +108,18 @@ de = { "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).", "player-file-open-error": "Fehler beim Öffnen der Datei durch den Player", - "player-path-error": "Ungültiger Player-Pfad. Supported players are: mpv, mpv.net, VLC, MPC-HC, MPC-BE and mplayer2", # To do: Translate end + "player-path-error": "Ungültiger Player-Pfad. Unterstützte Player sind: mpv, mpv.net, VLC, MPC-HC, MPC-BE und mplayer2", "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-twisted-error": "Could not import Twisted. Please install Twisted v16.4.0 or later.", #To do: translate + "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", "unable-to-start-client-error": "Client kann nicht gestartet werden", - "player-path-config-error": "Player-Pfad ist nicht ordnungsgemäß gesetzt. Supported players are: mpv, mpv.net, VLC, MPC-HC, MPC-BE and mplayer2.", # To do: Translate end + "player-path-config-error": "Player-Pfad ist nicht ordnungsgemäß gesetzt. Unterstützte Player sind: mpv, mpv.net, VLC, MPC-HC, MPC-BE und mplayer2", "no-file-path-config-error": "Es muss eine Datei ausgewählt werden, bevor der Player gestartet wird.", "no-hostname-config-error": "Hostname darf nicht leer sein", "invalid-port-config-error": "Port muss gültig sein", @@ -132,24 +132,24 @@ de = { "vlc-failed-noscript": "Laut VLC ist das syncplay.lua Interface-Skript nicht installiert. Auf https://syncplay.pl/LUA/ [Englisch] findest du eine Anleitung.", "vlc-failed-versioncheck": "Diese VLC-Version wird von Syncplay nicht unterstützt. Bitte nutze VLC 2.0", - "feature-sharedPlaylists": "shared playlists", # used for not-supported-by-server-error # TODO: Translate - "feature-chat": "chat", # used for not-supported-by-server-error # TODO: Translate - "feature-readiness": "readiness", # used for not-supported-by-server-error # TODO: Translate - "feature-managedRooms": "managed rooms", # used for not-supported-by-server-error # TODO: Translate + "feature-sharedPlaylists": "Geteilte Playlists", # used for not-supported-by-server-error + "feature-chat": "Chat", # used for not-supported-by-server-error + "feature-readiness": "Bereitschaftsstatus", # used for not-supported-by-server-error + "feature-managedRooms": "Zentral gesteuerte Räume", # used for not-supported-by-server-error - "not-supported-by-server-error": "Dieses Feature wird vom Server nicht unterstützt. Es wird ein Server mit Syncplay Version {}+ benötigt, aktuell verwendet wird jedoch Version {}.", # minVersion, serverVersion - "shared-playlists-not-supported-by-server-error": "The shared playlists feature may not be supported by the server. To ensure that it works correctly requires a server running Syncplay {}+, but the server is running Syncplay {}.", # minVersion, serverVersion # TODO: Translate - "shared-playlists-disabled-by-server-error": "The shared playlist feature has been disabled in the server configuration. To use this feature you will need to connect to a different server.", # TODO: Translate + "not-supported-by-server-error": "Diese Funktion wird vom Server nicht unterstützt. Es wird ein Server mit Syncplay Version {}+ benötigt, aktuell verwendet wird jedoch Version {}.", # minVersion, serverVersion + "shared-playlists-not-supported-by-server-error": "Die Geteilte-Playlists-Funktion wird von diesem Server eventuell nicht unterstützt. Um ein korrektes Funktionieren sicherzustellen wird ein Server mit Syncplay Version {}+ benötigt, aktuell verwendet wird jedoch Version {}.", # minVersion, serverVersion + "shared-playlists-disabled-by-server-error": "Die Geteilte-Playlists-Funktion wurde in der Serverkonfiguration deaktiviert. Um diese Funktion zu verwenden, musst du dich mit einem anderen Server verbinden.", "invalid-seek-value": "Ungültige Zeitangabe", "invalid-offset-value": "Ungültiger Offset-Wert", - "switch-file-not-found-error": "Konnte nicht zur Datei '{0}' wechseln. Syncplay looks in the specified media directories.", # File not found, folder it was not found in # TODO: Re-translate "Syncplay sucht im Ordner der aktuellen Datei und angegebenen Medien-Verzeichnissen." to reference to checking in "current media directory" - "folder-search-timeout-error": "The search for media in media directories was aborted as it took too long to search through '{}'. This will occur if you select a folder with too many sub-folders in your list of media folders to search through. For automatic file switching to work again please select File->Set Media Directories in the menu bar and remove this directory or replace it with an appropriate sub-folder. If the folder is actually fine then you can re-enable it by selecting File->Set Media Directories and pressing 'OK'.", # Folder # TODO: Translate - "folder-search-first-file-timeout-error": "The search for media in '{}' was aborted as it took too long to access the directory. This could happen if it is a network drive or if you configure your drive to spin down after a period of inactivity. For automatic file switching to work again please go to File->Set Media Directories and either remove the directory or resolve the issue (e.g. by changing power saving settings).", # Folder # TODO: Translate - "added-file-not-in-media-directory-error": "You loaded a file in '{}' which is not a known media directory. You can add this as a media directory by selecting File->Set Media Directories in the menu bar.", # Folder # TODO: Translate - "no-media-directories-error": "No media directories have been set. For shared playlist and file switching features to work properly please select File->Set Media Directories and specify where Syncplay should look to find media files.", # TODO: Translate - "cannot-find-directory-error": "Could not find media directory '{}'. To update your list of media directories please select File->Set Media Directories from the menu bar and specify where Syncplay should look to find media files.", # TODO: Translate + "switch-file-not-found-error": "Konnte nicht zur Datei „{0}“ wechseln. Syncplay sucht im Verzeichnis der aktuellen Datei und angegebenen Medienverzeichnissen.", # File not found, folder it was not found in + "folder-search-timeout-error": "Die Suche nach Medien in den Medienverzeichnissen wurde abgebrochen, weil es zu lange gedauert hat, „{}“ zu durchsuchen. Das kann passieren, wenn du in deiner Liste der Medienverzeichnisse ein Verzeichnis mit zu vielen Unterverzeichnissen auswhälst. Damit der automatische Dateiwechsel wieder funktioniert, wähle Datei->Medienverzeichnisse auswählen in der Menüleiste und entferne dieses Verzeichnis oder ersetze es mit einem geeigneten Unterverzeichnis. Wenn das Verzeichnis in Ordnung ist, kannst du es reaktivieren, indem du Datei->Medienverzeichnisse auswählen wählst und „OK“ drückst.", # Folder + "folder-search-first-file-timeout-error": "Die Suche nach Medien in den Medienverzeichnissen wurde abgebrochen, weil es zu lange gedauert hat, auf „{}“ zuzugreifen. Das kann passieren, wenn es sich dabei um ein Netzwerkgerät handelt und du eingestellt hast, dass es sich nach Inaktivität ausschaltet. Damit der automatische Dateiwechsel wieder funktioniert, wähle Datei->Medienverzeichnisse auswählen in der Menüleiste und entferne dieses Verzeichnis oder löse das Problem (z.B. indem du die Energiespareinstellungen anpasst).", # Folder + "added-file-not-in-media-directory-error": "Du hast eine Datei in im Verzeichnis „{}“ geladeden, welches kein bekanntes Medienverzeichnis ist. Du kannst es als Medienverzeichnis hinzufügen, indem du Datei->Medienverzeichnisse auswählen in der Menüleiste wählst.", # Folder + "no-media-directories-error": "Es wurden keine Medienverzeichnisse ausgewählt. Damit geteilte Playlists und Dateiwechsel korrekt funktionieren, wähle Datei->Medienverzeichnisse auswählen in der Menüleiste und gib an, wo Syncplay nach Mediendateien suchen soll.", + "cannot-find-directory-error": "Das Medienverzeichnis „{}“ konnte nicht gefunden werden. Um deine Liste an Medienverzeichnissen anzupassen, wähle Datei->Medienverzeichnisse auswählen in der Menüleiste und gib an, wo Syncplay nach Mediendateien suchen soll.", "failed-to-load-server-list-error": "Konnte die Liste der öffentlichen Server nicht laden. Bitte besuche https://www.syncplay.pl/ [Englisch] mit deinem Browser.", @@ -173,10 +173,10 @@ de = { "version-argument": 'gibt die aktuelle Version aus', "version-message": "Du verwendest Syncplay v. {} ({})", - "load-playlist-from-file-argument": "loads playlist from text file (one entry per line)", # TODO: Translate + "load-playlist-from-file-argument": "lädt eine Playlist aus einer Textdatei (ein Eintrag pro Zeile)", # Client labels - "config-window-title": "Syncplay Konfiguration", + "config-window-title": "Syncplay-Konfiguration", "connection-group-title": "Verbindungseinstellungen", "host-label": "Server-Adresse:", @@ -186,7 +186,7 @@ de = { "media-setting-title": "Media-Player Einstellungen", "executable-path-label": "Pfad zum Media-Player:", - "media-path-label": "Pfad zur Datei:", # Todo: Translate to 'Path to video (optional)' + "media-path-label": "Pfad zum Video (optional):", "player-arguments-label": "Playerparameter:", "browse-label": "Durchsuchen", "update-server-list-label": "Liste aktualisieren", @@ -202,10 +202,10 @@ de = { "checkforupdatesautomatically-label": "Automatisch nach Updates suchen", "slowondesync-label": "Verlangsamen wenn nicht synchron (nicht unterstützt mit MPC-HC/BE)", "dontslowdownwithme-label": "Nie verlangsamen oder andere zurückspulen (Experimentell)", - "pausing-title": "Pausing", # TODO: Translate + "pausing-title": "Pausiere", "pauseonleave-label": "Pausieren wenn ein Benutzer austritt", - "readiness-title": "Initial readiness state", # TODO: Translate - "readyatstart-label": "Standardmäßig auf \'Bereit\' stellen", + "readiness-title": "Anfänglicher Bereitschaftsstatus", + "readyatstart-label": "Standardmäßig auf „Bereit“ stellen", "forceguiprompt-label": "Diesen Dialog nicht mehr anzeigen", "showosd-label": "OSD-Nachrichten anzeigen", @@ -230,7 +230,7 @@ de = { "messages-label": "Nachrichten", "messages-osd-title": "OSD-(OnScreenDisplay)-Einstellungen", "messages-other-title": "Weitere Display-Einstellungen", - "chat-label": "Chat", # TODO: Translate + "chat-label": "Chat", "privacy-label": "Privatsphäre", "privacy-title": "Privatsphäreneinstellungen", "unpause-title": "Wenn du Play drückst, auf Bereit setzen und:", @@ -238,36 +238,36 @@ de = { "unpause-ifothersready-option": "Wiedergeben wenn bereits als Bereit gesetzt oder alle anderen bereit sind (Standard)", "unpause-ifminusersready-option": "Wiedergeben wenn bereits als Bereit gesetzt oder die minimale Anzahl anderer Nutzer bereit ist", "unpause-always": "Immer wiedergeben", - "syncplay-trusteddomains-title": "Trusted domains (for streaming services and hosted content)", # TODO: Translate into German + "syncplay-trusteddomains-title": "Vertrauenswürdige Domains (für Streamingdienste und gehostete Inhalte)", - "chat-title": "Chat message input", # TODO: Translate - "chatinputenabled-label": "Enable chat input via mpv (using enter key)", # TODO: Translate - "chatdirectinput-label": "Allow instant chat input (bypass having to press enter key to chat)", # TODO: Translate - "chatinputfont-label": "Chat input font", # TODO: Translate - "chatfont-label": "Set font", # TODO: Translate - "chatcolour-label": "Set colour", # TODO: Translate - "chatinputposition-label": "Position of message input area in mpv", # TODO: Translate - "chat-top-option": "Top", # TODO: Translate - "chat-middle-option": "Middle", # TODO: Translate - "chat-bottom-option": "Bottom", # TODO: Translate - "chatoutputheader-label": "Chat message output", # TODO: Translate - "chatoutputfont-label": "Chat output font", # TODO: Translate - "chatoutputenabled-label": "Enable chat output in media player (mpv only for now)", # TODO: Translate - "chatoutputposition-label": "Output mode", # TODO: Translate - "chat-chatroom-option": "Chatroom style", # TODO: Translate - "chat-scrolling-option": "Scrolling style", # TODO: Translate + "chat-title": "Chatnachrichten-Eingabe", + "chatinputenabled-label": "Chateingabe via mpv erlauben (mit der Entertaste)", + "chatdirectinput-label": "Sofotige Chateingabe erlauben (ohne die Entertaste zu drücken)", + "chatinputfont-label": "Chateingabe-Schriftart", + "chatfont-label": "Schriftart wählen", + "chatcolour-label": "Farbe wählen", + "chatinputposition-label": "Position des Nachrichteneingabe-Felds in mpv", + "chat-top-option": "Oben", + "chat-middle-option": "Mitte", + "chat-bottom-option": "Unten", + "chatoutputheader-label": "Chatnachrichten-Eingabe", + "chatoutputfont-label": "Chateingabe-Schriftart", + "chatoutputenabled-label": "Chatausgabe im Medienplayer aktivieren (bisher nur mpv)", + "chatoutputposition-label": "Ausgabemodus", + "chat-chatroom-option": "Chatroom-Stil", + "chat-scrolling-option": "Scrolling-Stil", - "mpv-key-tab-hint": "[TAB] to toggle access to alphabet row key shortcuts.", # TODO: Translate - "mpv-key-hint": "[ENTER] to send message. [ESC] to escape chat mode.", # TODO: Translate - "alphakey-mode-warning-first-line": "You can temporarily use old mpv bindings with a-z keys.", # TODO: Translate - "alphakey-mode-warning-second-line": "Press [TAB] to return to Syncplay chat mode.", # TODO: Translate + "mpv-key-tab-hint": "[TAB] um Zugriff auf die Buchstabentastenkürzel ein-/auszuschalten.", + "mpv-key-hint": "[ENTER] um eine Nachricht zu senden. [ESC] um den Chatmodus zu verlassen.", + "alphakey-mode-warning-first-line": "Du kannst vorübergehend die alten mpv-Tastaturkürzel mit den a–z-Tasten verwenden.", + "alphakey-mode-warning-second-line": "Drücke [TAB], um in den Syncplay-Chatmodus zurückzukehren.", "help-label": "Hilfe", - "reset-label": "Standardwerte zurücksetzen", + "reset-label": "Auf Standardwerte zurücksetzen", "run-label": "Syncplay starten", "storeandrun-label": "Konfiguration speichern und Syncplay starten", - "contact-label": "Du hast eine Idee, einen Bug gefunden oder möchtest Feedback geben? Sende eine E-Mail an dev@syncplay.pl, chatte auf dem #Syncplay IRC-Kanal auf irc.freenode.net oder öffne eine Fehlermeldung auf GitHub. Außerdem findest du auf https://syncplay.pl/ weitere Informationen, Hilfestellungen und Updates. OTE: Chat messages are not encrypted so do not use Syncplay to send sensitive information.", # TODO: Translate last sentence + "contact-label": "Du hast eine Idee, einen Bug gefunden oder möchtest Feedback geben? Sende eine E-Mail an dev@syncplay.pl, chatte auf dem #Syncplay IRC-Kanal auf irc.freenode.net oder öffne eine Fehlermeldung auf GitHub. Außerdem findest du auf https://syncplay.pl/ weitere Informationen, Hilfestellungen und Updates. Chatnachrichten sind nicht verschlüsselt, also verwende Syncplay nicht, um sensible Daten zu verschicken.", "joinroom-label": "Raum beitreten", "joinroom-menu-label": "Raum beitreten {}", # TODO: Might want to fix this @@ -280,9 +280,9 @@ de = { "autoplay-guipushbuttonlabel": "Automatisch abspielen wenn alle bereit sind", "autoplay-minimum-label": "Minimum an Nutzern:", - "sendmessage-label": "Send", # TODO: Translate + "sendmessage-label": "Senden", - "ready-guipushbuttonlabel": "Ich bin bereit den Film anzuschauen!", + "ready-guipushbuttonlabel": "Ich bin bereit zum Gucken!", "roomuser-heading-label": "Raum / Benutzer", "size-heading-label": "Größe", @@ -296,17 +296,17 @@ de = { "file-menu-label": "&Datei", # & precedes shortcut key "openmedia-menu-label": "&Mediendatei öffnen...", "openstreamurl-menu-label": "&Stream URL öffnen", - "setmediadirectories-menu-label": "Set media &directories", # TODO: Translate - "loadplaylistfromfile-menu-label": "&Load playlist from file", # TODO: Translate - "saveplaylisttofile-menu-label": "&Save playlist to file", # TODO: Translate + "setmediadirectories-menu-label": "Medienverzeichnisse &auswählen", + "loadplaylistfromfile-menu-label": "&Lade Playlist aus Datei", + "saveplaylisttofile-menu-label": "&Speichere Playlist in Datei", "exit-menu-label": "&Beenden", "advanced-menu-label": "&Erweitert", "window-menu-label": "&Fenster", "setoffset-menu-label": "&Offset einstellen", "createcontrolledroom-menu-label": "&Zentral gesteuerten Raum erstellen", "identifyascontroller-menu-label": "Als Raumleiter &identifizieren", - "settrusteddomains-menu-label": "Set &trusted domains", # TODO: Translate - "addtrusteddomain-menu-label": "Add {} as trusted domain", # Domain # TODO: Translate + "settrusteddomains-menu-label": "&Vertrauenswürdige Domains auswählen", + "addtrusteddomain-menu-label": "{} als vertrauenswürdige Domain hinzufügen", # Domain "edit-menu-label": "&Bearbeiten", "cut-menu-label": "Aus&schneiden", @@ -320,39 +320,39 @@ de = { "userguide-menu-label": "&Benutzerhandbuch öffnen", "update-menu-label": "auf &Aktualisierung prüfen", - # startTLS messages - TODO: Translate - "startTLS-initiated": "Attempting secure connection", - "startTLS-secure-connection-ok": "Secure connection established ({})", - "startTLS-server-certificate-invalid": 'Secure connection failed. The server uses an invalid security certificate. This communication could be intercepted by a third party. For further details and troubleshooting see here.', - "startTLS-not-supported-client": "This client does not support TLS", - "startTLS-not-supported-server": "This server does not support TLS", + # startTLS messages + "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 hier [Englisch].', + "startTLS-not-supported-client": "Dieser Server unterstützt kein TLS", + "startTLS-not-supported-server": "Dieser Server unterstützt kein TLS", - # TLS certificate dialog - TODO: Translate - "tls-information-title": "Certificate Details", - "tls-dialog-status-label": "Syncplay is using an encrypted connection to {}.", - "tls-dialog-desc-label": "Encryption with a digital certificate keeps information private as it is sent to or from the
server {}.", - "tls-dialog-connection-label": "Information encrypted using Transport Layer Security (TLS), version {} with the cipher
suite: {}.", - "tls-dialog-certificate-label": "Certificate issued by {} valid until {}.", + # TLS certificate dialog + "tls-information-title": "Zertifikatdetails", + "tls-dialog-status-label": "Syncplay nutzt eine verschlüsselte Verbindung zu {}.", + "tls-dialog-desc-label": "Verschlüsselung mit einem digitalen Zertifikat hält Informationen geheim, die vom Server {} gesendet oder empfangen werden.", + "tls-dialog-connection-label": "Daten werden verschlüsselt mit Transport Layer Security (TLS) Version {} und
folgender Chiffre: {}.", + "tls-dialog-certificate-label": "Zertifikat ausgestellt durch {} gültig bis {}.", - # About dialog - TODO: Translate - "about-menu-label": "&About Syncplay", - "about-dialog-title": "About Syncplay", - "about-dialog-release": "Version {} release {}", - "about-dialog-license-text": "Licensed under the Apache License, Version 2.0", - "about-dialog-license-button": "License", - "about-dialog-dependencies": "Dependencies", + # About dialog + "about-menu-label": "&Über Syncplay", + "about-dialog-title": "Über Syncplay", + "about-dialog-release": "Version {} Release {}", + "about-dialog-license-text": "Lizensiert unter der Apache-Lizenz Version 2.0", + "about-dialog-license-button": "Lizenz", + "about-dialog-dependencies": "Abhängigkeiten", "setoffset-msgbox-label": "Offset einstellen", "offsetinfo-msgbox-label": "Offset (siehe https://syncplay.pl/guide/ für eine Anleitung [Englisch]):", - "promptforstreamurl-msgbox-label": "Stream URL öffnen", - "promptforstreamurlinfo-msgbox-label": "Stream URL", + "promptforstreamurl-msgbox-label": "Stream-URL öffnen", + "promptforstreamurlinfo-msgbox-label": "Stream-URL", - "addfolder-label": "Add folder", # TODO: Translate + "addfolder-label": "Verzeichnis hinzufügen", - "adduris-msgbox-label": "Add URLs to playlist (one per line)", # TODO: Translate - "editplaylist-msgbox-label": "Set playlist (one per line)", # TODO: Translate - "trusteddomains-msgbox-label": "Domains it is okay to automatically switch to (one per line)", # TODO: Translate + "adduris-msgbox-label": "URLs zur Playlist hinzufügen (ein Eintrag pro Zeile)", + "editplaylist-msgbox-label": "Playlist auswählen (ein Eintrag pro Zeile)", + "trusteddomains-msgbox-label": "Domains, zu denen automatisch gewechselt werden darf (ein Eintrag pro Zeile)", "createcontrolledroom-msgbox-label": "Zentral gesteuerten Raum erstellen", "controlledroominfo-msgbox-label": "Namen des zentral gesteuerten Raums eingeben\r\n(siehe https://syncplay.pl/guide/ für eine Anleitung [Englisch]):", @@ -372,9 +372,9 @@ de = { "room-tooltip": "Der Raum, der betreten werden soll, kann ein x-beliebiger sein. Allerdings werden nur Clients im selben Raum synchronisiert.", "executable-path-tooltip": "Pfad zum ausgewählten, unterstützten Mediaplayer (MPC-HC, MPC-BE, VLC, mplayer2 or mpv).", - "media-path-tooltip": "Pfad zum wiederzugebenden Video oder Stream. Notwendig für mplayer2.", # TODO: Confirm translation - "player-arguments-tooltip": "Zusätzliche Kommandozeilenparameter / -schalter für diesen Mediaplayer.", - "mediasearcdirectories-arguments-tooltip": "Verzeichnisse, in denen Syncplay nach Mediendateien suchen soll, z.B. wenn du das Click-to-switch-Feature verwendest. Syncplay wird rekursiv Unterordner durchsuchen.", # TODO: Translate Click-to-switch? (or use as name for feature) + "media-path-tooltip": "Pfad zum wiederzugebenden Video oder Stream. Notwendig für mplayer2.", + "player-arguments-tooltip": "Zusätzliche Kommandozeilenparameter/-schalter für diesen Mediaplayer.", + "mediasearcdirectories-arguments-tooltip": "Verzeichnisse, in denen Syncplay nach Mediendateien suchen soll, z.B. wenn du die Click-to-switch-Funktion verwendest. Syncplay wird Unterverzeichnisse rekursiv durchsuchen.", # TODO: Translate Click-to-switch? (or use as name for feature) "more-tooltip": "Weitere Einstellungen anzeigen.", "filename-privacy-tooltip": "Privatheitsmodus beim Senden des Namens der aktuellen Datei zum Server.", @@ -388,11 +388,11 @@ de = { "fastforwardondesync-label": "Vorspulen wenn das Video laggt (empfohlen)", "dontslowdownwithme-tooltip": "Lässt andere nicht langsamer werden oder zurückspringen, wenn deine Wiedergabe hängt.", "pauseonleave-tooltip": "Wiedergabe anhalten, wenn deine Verbindung verloren geht oder jemand den Raum verlässt.", - "readyatstart-tooltip": "Zu Beginn auf 'Bereit' setzen (sonst bist du als 'Nicht Bereit' gesetzt, bis du den Status änderst)", + "readyatstart-tooltip": "Zu Beginn auf „Bereit“ setzen (sonst bist du als „Nicht Bereit“ gesetzt, bis du den Status änderst)", "forceguiprompt-tooltip": "Der Konfigurationsdialog wird nicht angezeigt, wenn eine Datei mit Syncplay geöffnet wird.", "nostore-tooltip": "Syncplay mit den angegebenen Einstellungen starten, diese aber nicht dauerhaft speichern.", "rewindondesync-tooltip": "Zum Wiederherstellen der Synchronität in der Zeit zurückspringen (empfohlen)", - "fastforwardondesync-tooltip": "Nach vorne springen, wenn asynchron zum Raumleiter (oder deine vorgetäuschte Position, falls 'Niemals verlangsamen oder andere zurückspulen' aktiviert ist).", + "fastforwardondesync-tooltip": "Nach vorne springen, wenn asynchron zum Raumleiter (oder deine vorgetäuschte Position, falls „Niemals verlangsamen oder andere zurückspulen“ aktiviert ist).", "showosd-tooltip": "Syncplay-Nachrichten auf dem OSD (= OnScreenDisplay, ein eingeblendetes Textfeld) des Players anzeigen.", "showosdwarnings-tooltip": "Warnungen bei Unterschiedlichen Dateien oder Alleinsein im Raum anzeigen.", "showsameroomosd-tooltip": "OSD-Meldungen über Ereignisse im selben Raum anzeigen.", @@ -405,36 +405,36 @@ de = { "unpause-ifalreadyready-tooltip": "Wenn du nicht bereit bist und Play drückst wirst du als bereit gesetzt - zum Starten der Wiedergabe nochmal drücken.", "unpause-ifothersready-tooltip": "Wenn du Play drückst und nicht bereit bist, wird nur gestartet, wenn alle anderen bereit sind.", "unpause-ifminusersready-tooltip": "Wenn du Play drückst und nicht bereit bist, wird nur gestartet, wenn die minimale Anzahl anderer Benutzer bereit ist.", - "trusteddomains-arguments-tooltip": "Domains that it is okay for Syncplay to automatically switch to when shared playlists is enabled.", # TODO: Translate into German + "trusteddomains-arguments-tooltip": "Domains, zu denen Syncplay automatisch wechself darf, wenn geteilte Playlists aktiviert sind.", - "chatinputenabled-tooltip": "Enable chat input in mpv (press enter to chat, enter to send, escape to cancel)", # TODO: Translate - "chatdirectinput-tooltip": "Skip having to press 'enter' to go into chat input mode in mpv. Press TAB in mpv to temporarily disable this feature.", # TODO: Translate - "font-label-tooltip": "Font used for when entering chat messages in mpv. Client-side only, so doesn't affect what other see.", # TODO: Translate - "set-input-font-tooltip": "Font family used for when entering chat messages in mpv. Client-side only, so doesn't affect what other see.", # TODO: Translate - "set-input-colour-tooltip": "Font colour used for when entering chat messages in mpv. Client-side only, so doesn't affect what other see.", # TODO: Translate - "chatinputposition-tooltip": "Location in mpv where chat input text will appear when you press enter and type.", # TODO: Translate - "chatinputposition-top-tooltip": "Place chat input at top of mpv window.", # TODO: Translate - "chatinputposition-middle-tooltip": "Place chat input in dead centre of mpv window.", # TODO: Translate - "chatinputposition-bottom-tooltip": "Place chat input at bottom of mpv window.", # TODO: Translate - "chatoutputenabled-tooltip": "Show chat messages in OSD (if supported by media player).", # TODO: Translate - "font-output-label-tooltip": "Chat output font.", # TODO: Translate - "set-output-font-tooltip": "Font used for when displaying chat messages.", # TODO: Translate - "chatoutputmode-tooltip": "How chat messages are displayed.", # TODO: Translate - "chatoutputmode-chatroom-tooltip": "Display new lines of chat directly below previous line.", # TODO: Translate - "chatoutputmode-scrolling-tooltip": "Scroll chat text from right to left.", # TODO: Translate + "chatinputenabled-tooltip": "Chateingabe in mpv aktivieren (Drücke Enter zum Chatten, Enter zum Senden, Esc um abzubrechen)", + "chatdirectinput-tooltip": "Überspringe, Enter drücken zu müssen, um in mpv in den Chatmodus zu gelangen. Drücke TAB, um diese Funktion vorübergehend zu deaktivieren.", + "font-label-tooltip": "Schriftart für die Darstellung der Chateingabe in mpv. Nur clientseitig, beeinflusst also nicht, was andere sehen.", + "set-input-font-tooltip": "Schriftfamilie für die Darstellung der Chateingabe in mpv. Nur clientseitig, beeinflusst also nicht, was andere sehen.", + "set-input-colour-tooltip": "Schriftfarbe für die Darstellung der Chateingabe in mpv. Nur clientseitig, beeinflusst also nicht, was andere sehen.", + "chatinputposition-tooltip": "Position in mpv, an der Text der Chateingabe erscheint, wenn du Enter drückst und tippst.", + "chatinputposition-top-tooltip": "Chateingabe oben im mpv-Fenster platzieren.", + "chatinputposition-middle-tooltip": "Chateingabe mittig im mpv-Fenster platzieren.", + "chatinputposition-bottom-tooltip": "Chateingabe unten im mpv-Fenster platzieren.", + "chatoutputenabled-tooltip": "Chatnachrichten im OSD anzeigen (sofern vom Medienplayer unterstützt).", + "font-output-label-tooltip": "Chatausgabe-Schriftart.", + "set-output-font-tooltip": "Schriftart für die Darstellung von Chatnachrichten.", + "chatoutputmode-tooltip": "Wie Chatnachrichten dargestellt werden.", + "chatoutputmode-chatroom-tooltip": "Neue Chatzeilen unmittelbar unterder vorangehenden Zeile anzeigen.", + "chatoutputmode-scrolling-tooltip": "Chat-Text von rechts nach links scrollen lassen", "help-tooltip": "Öffnet Hilfe auf syncplay.pl [Englisch]", "reset-tooltip": "Alle Einstellungen auf Standardwerte zurücksetzen.", "update-server-list-tooltip": "Mit syncplay.pl verbinden um die Liste öffentlicher Server zu aktualisieren.", - "sslconnection-tooltip": "Securely connected to server. Click for certificate details.", # TODO: Translate + "sslconnection-tooltip": "Sicher mit Server verbunden. Klicken, um Zertifikatdetails anzuzeigen.", "joinroom-tooltip": "Den aktuellen Raum verlassen und stattdessen den angegebenen betreten.", "seektime-msgbox-label": "Springe zur angegebenen Zeit (in Sekunden oder min:sek). Verwende +/- zum relativen Springen.", "ready-tooltip": "Zeigt an, ob du bereit zum anschauen bist", "autoplay-tooltip": "Automatisch abspielen, wenn alle Nutzer bereit sind oder die minimale Nutzerzahl erreicht ist.", "switch-to-file-tooltip": "Doppelklicken um zu {} zu wechseln", # Filename - "sendmessage-tooltip": "Send message to room", # TODO: Translate + "sendmessage-tooltip": "Nachricht an Raum senden", # In-userlist notes (GUI) "differentsize-note": "Verschiedene Größe!", @@ -447,7 +447,7 @@ de = { # Server notifications "welcome-server-notification": "Willkommen zum Syncplay-Server, v. {0}", # version - "client-connected-room-server-notification": "{0}({2}) hat den Raum '{1}' betreten", # username, host, room + "client-connected-room-server-notification": "{0}({2}) hat den Raum „{1}“ betreten", # username, host, room "client-left-server-notification": "{0} hat den Server verlassen", # name "no-salt-notification": "WICHTIGER HINWEIS: Damit von dem Server generierte Passwörter für geführte Räume auch nach einem Serverneustart funktionieren, starte den Server mit dem folgenden Parameter: --salt {}", # Salt @@ -455,52 +455,52 @@ de = { "server-argument-description": 'Anwendung, um mehrere MPlayer, MPC-HC/BE und VLC-Instanzen über das Internet zu synchronisieren. Server', "server-argument-epilog": 'Wenn keine Optionen angegeben sind, werden die _config-Werte verwendet', "server-port-argument": 'Server TCP-Port', - "server-password-argument": 'Server Passwort', + "server-password-argument": 'Server-Passwort', "server-isolate-room-argument": 'Sollen die Räume isoliert sein?', "server-salt-argument": "zufällige Zeichenkette, die zur Erstellung von Passwörtern verwendet wird", "server-disable-ready-argument": "Bereitschaftsfeature deaktivieren", "server-motd-argument": "Pfad zur Datei, von der die Nachricht des Tages geladen wird", - "server-chat-argument": "Should chat be disabled?", # TODO: Translate - "server-chat-maxchars-argument": "Maximum number of characters in a chat message (default is {})", # TODO: Translate - "server-maxusernamelength-argument": "Maximum number of characters in a username (default is {})", # TODO: Translate - "server-stats-db-file-argument": "Enable server stats using the SQLite db file provided", # TODO: Translate - "server-startTLS-argument": "Enable TLS connections using the certificate files in the path provided", # TODO: Translate + "server-chat-argument": "Soll Chat deaktiviert werden?", + "server-chat-maxchars-argument": "Maximale Zeichenzahl in einer Chatnachricht (Standard ist {})", + "server-maxusernamelength-argument": "Maximale Zeichenzahl in einem Benutzernamen (Standard ist {})", + "server-stats-db-file-argument": "Aktiviere Server-Statistiken mithilfe der bereitgestellten SQLite-db-Datei", + "server-startTLS-argument": "Erlaube TLS-Verbindungen mit den Zertifikatdateien im Angegebenen Pfad", "server-messed-up-motd-unescaped-placeholders": "Die Nachricht des Tages hat unmaskierte Platzhalter. Alle $-Zeichen sollten verdoppelt werden ($$).", "server-messed-up-motd-too-long": "Die Nachricht des Tages ist zu lang - Maximal {} Zeichen, aktuell {}.", # Server errors "unknown-command-server-error": "Unbekannter Befehl {}", # message "not-json-server-error": "Kein JSON-String {}", # message - "line-decode-server-error": "Not a utf-8 string", # TODO: Translate + "line-decode-server-error": "Keine utf-8-Zeichenkette", "not-known-server-error": "Der Server muss dich kennen, bevor du diesen Befehl nutzen kannst", "client-drop-server-error": "Client verloren: {} -- {}", # host, error "password-required-server-error": "Passwort nötig", "wrong-password-server-error": "Ungültiges Passwort", "hello-server-error": "Zu wenige Hello-Argumente", - # Playlists TODO: Translate all this to German - "playlist-selection-changed-notification": "{} changed the playlist selection", # Username - "playlist-contents-changed-notification": "{} updated the playlist", # Username - "cannot-find-file-for-playlist-switch-error": "Could not find file {} in media directories for playlist switch!", # Filename - "cannot-add-duplicate-error": "Could not add second entry for '{}' to the playlist as no duplicates are allowed.", # Filename - "cannot-add-unsafe-path-error": "Could not automatically load {} because it is not on a trusted domain. You can switch to the URL manually by double clicking it in the playlist, and add trusted domains via File->Advanced->Set Trusted Domains. If you right click on a URL then you can add its domain as a trusted domain via the context menu.", # Filename - "sharedplaylistenabled-label": "Enable shared playlists", - "removefromplaylist-menu-label": "Remove from playlist", - "shuffleremainingplaylist-menu-label": "Shuffle remaining playlist", - "shuffleentireplaylist-menu-label": "Shuffle entire playlist", - "undoplaylist-menu-label": "Undo last change to playlist", - "addfilestoplaylist-menu-label": "Add file(s) to bottom of playlist", - "addurlstoplaylist-menu-label": "Add URL(s) to bottom of playlist", - "editplaylist-menu-label": "Edit playlist", + # Playlists + "playlist-selection-changed-notification": "{} hat die Playlist-Auswahl geändert", # Username + "playlist-contents-changed-notification": "{} hat die Playlist aktualisiert", # Username + "cannot-find-file-for-playlist-switch-error": "Die Datei {} konnte zum Dateiwechsel nicht in den Medienverzeichnissen gefunden werden!", # Filename + "cannot-add-duplicate-error": "Konnte zweiten Eintrag für „{}“ nicht zur Playlist hinzufügen, weil Dubletten nicht erlaubt sind.", # Filename + "cannot-add-unsafe-path-error": "{} konnte nicht automatisch geladen werden, weil es sich nicht um eine vertrauenswürdige Domain handelt. Du kannst manuell zu der URL wechseln, indem du sie in der Playlist doppelklickst oder vertrauenswürdige Domains unter Datei->Erweitert->Vertrauenswürdige Domains auswählen hinzufügst. Wenn du einen Rechtsklick auf eine URL ausführst, kannst du ihre Domain im Kontextmenü als vertrauenswürdig hinzufügen.", # Filename + "sharedplaylistenabled-label": "Geteilte Playlists aktivieren", + "removefromplaylist-menu-label": "Von Playlist entfernen", + "shuffleremainingplaylist-menu-label": "Verbleibende Playlist shuffeln", + "shuffleentireplaylist-menu-label": "Gesamte Playlist shuffeln", + "undoplaylist-menu-label": "Letze Playlist-Änderung rückgängig machen", + "addfilestoplaylist-menu-label": "Datei(en) zum Ende der Playlist hinzufügen", + "addurlstoplaylist-menu-label": "URL(s) zum Ende der Playlist hinzufügen", + "editplaylist-menu-label": "Playlist bearbeiten", - "open-containing-folder": "Open folder containing this file", - "addyourfiletoplaylist-menu-label": "Add your file to playlist", - "addotherusersfiletoplaylist-menu-label": "Add {}'s file to playlist", # [Username] - "addyourstreamstoplaylist-menu-label": "Add your stream to playlist", - "addotherusersstreamstoplaylist-menu-label": "Add {}' stream to playlist", # [Username] - "openusersstream-menu-label": "Open {}'s stream", # [username]'s - "openusersfile-menu-label": "Open {}'s file", # [username]'s + "open-containing-folder": "Übergeordnetes Verzeichnis der Datei öffnen", + "addyourfiletoplaylist-menu-label": "Deine Datei zur Playlist hinzufügen", + "addotherusersfiletoplaylist-menu-label": "{}s Datei zur Playlist hinzufügen", # [Username] + "addyourstreamstoplaylist-menu-label": "Deinen Stream zur Playlist hinzufügen", + "addotherusersstreamstoplaylist-menu-label": "{}s Stream zur Playlist hinzufügen", # [Username] + "openusersstream-menu-label": "{}s Stream öffnen", # [username]'s + "openusersfile-menu-label": "{}s Datei öffnen", # [username]'s - "playlist-instruction-item-message": "Drag file here to add it to the shared playlist.", - "sharedplaylistenabled-tooltip": "Room operators can add files to a synced playlist to make it easy for everyone to watching the same thing. Configure media directories under 'Misc'.", + "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“", } From 2d6d4b43cef63bd1f77952d37c8979ad57bad28a Mon Sep 17 00:00:00 2001 From: FichteFoll Date: Tue, 14 Apr 2020 16:59:15 +0200 Subject: [PATCH 101/105] Work around performance regression in mpv's osd In mpv-player/mpv@07287262513c0d1ea46b7beaf100e73f2008295f, a strcmp on the previously displayed and the new text has been removed, causing excessive GPU usage especially on idle frames when playback was paused. I will submit a patch to upstream, but mpv versions 0.31 & 0.32 are already affected by this. See torque/mpv-progressbar#56 for a similar report to a different script. --- syncplay/resources/syncplayintf.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/syncplay/resources/syncplayintf.lua b/syncplay/resources/syncplayintf.lua index 9115faf..839f4e4 100644 --- a/syncplay/resources/syncplayintf.lua +++ b/syncplay/resources/syncplayintf.lua @@ -133,6 +133,7 @@ function add_chat(chat_message, mood) chat_log[entry] = { xpos=CANVAS_WIDTH, timecreated=mp.get_time(), text=tostring(chat_message), row=row } end +local old_ass_text = '' function chat_update() local ass = assdraw.ass_new() local chat_ass = '' @@ -179,7 +180,14 @@ function chat_update() ass:append(input_ass()) ass:append(chat_ass) end - mp.set_osd_ass(CANVAS_WIDTH,CANVAS_HEIGHT, ass.text) + + -- The commit that introduced the new API removed the internal heuristics on whether a refresh is required, + -- so we check for changed text manually to not cause excessive GPU load + -- https://github.com/mpv-player/mpv/commit/07287262513c0d1ea46b7beaf100e73f2008295f#diff-d88d582039dea993b6229da9f61ba76cL530 + if ass.text ~= old_ass_text then + mp.set_osd_ass(CANVAS_WIDTH,CANVAS_HEIGHT, ass.text) + old_ass_text = ass.text + end end function process_alert_osd() @@ -982,4 +990,4 @@ function set_syncplayintf_options(input) end chat_format = get_output_style() readyMpvAfterSettingsKnown() -end \ No newline at end of file +end From ff5b6696837918d7ade5386d7d3260504983637a Mon Sep 17 00:00:00 2001 From: Alexandria <28266167+alxpettit@users.noreply.github.com> Date: Fri, 17 Apr 2020 06:08:58 -0700 Subject: [PATCH 102/105] fix warning message (#297) /usr/lib/syncplay/syncplay/ui/GuiConfiguration.py:323: SyntaxWarning: "is not" with a literal. Did you mean "!="? --- syncplay/ui/GuiConfiguration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncplay/ui/GuiConfiguration.py b/syncplay/ui/GuiConfiguration.py index ee0f0a8..c6f3a30 100755 --- a/syncplay/ui/GuiConfiguration.py +++ b/syncplay/ui/GuiConfiguration.py @@ -320,7 +320,7 @@ class ConfigDialog(QtWidgets.QDialog): try: self.lastCheckedForUpdates = settings.value("lastCheckedQt", None) if self.lastCheckedForUpdates: - if self.config["lastCheckedForUpdates"] is not None and self.config["lastCheckedForUpdates"] != "": + if self.config["lastCheckedForUpdates"] != None and self.config["lastCheckedForUpdates"] != "": if self.lastCheckedForUpdates.toPython() > datetime.strptime(self.config["lastCheckedForUpdates"], "%Y-%m-%d %H:%M:%S.%f"): self.config["lastCheckedForUpdates"] = self.lastCheckedForUpdates.toString("yyyy-MM-d HH:mm:ss.z") else: From 2143b7dcf1b1cddf7b59ee82084eacbc4201bee2 Mon Sep 17 00:00:00 2001 From: et0h Date: Sat, 18 Apr 2020 20:03:48 +0100 Subject: [PATCH 103/105] Fixed trailing newlines breaking messages (#300) --- syncplay/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/syncplay/client.py b/syncplay/client.py index e6d7934..5b60888 100755 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -830,6 +830,10 @@ class SyncplayClient(object): @requireServerFeature("chat") def sendChat(self, message): if self._protocol and self._protocol.logged: + try: + message = message.replace("\n", "").replace("\r", "") + except: + pass message = utils.truncateText(message, constants.MAX_CHAT_MESSAGE_LENGTH) self._protocol.sendChatMessage(message) From 1daea64327c432b563201c6543a671053a0d5e10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?At=C3=ADlio=20Ant=C3=B4nio=20Dadalto?= Date: Sun, 19 Apr 2020 14:56:57 -0300 Subject: [PATCH 104/105] Add Brazilian Portuguese translation (#291) * Add Brazilian Portuguese translation to Syncplay and its installer * Add new 'pt_BR' language to 'language-argument' * Fix NSIS arguments Insert missing word * Tweak and fix some strings --- buildPy2exe.py | 17 ++ syncplay/messages.py | 2 + syncplay/messages_de.py | 6 +- syncplay/messages_en.py | 2 +- syncplay/messages_es.py | 2 +- syncplay/messages_it.py | 2 +- syncplay/messages_pt_BR.py | 506 +++++++++++++++++++++++++++++++++++++ syncplay/messages_ru.py | 2 +- 8 files changed, 532 insertions(+), 7 deletions(-) create mode 100644 syncplay/messages_pt_BR.py diff --git a/buildPy2exe.py b/buildPy2exe.py index 84c357e..78bb5d6 100755 --- a/buildPy2exe.py +++ b/buildPy2exe.py @@ -63,6 +63,7 @@ NSIS_SCRIPT_TEMPLATE = r""" LoadLanguageFile "$${NSISDIR}\Contrib\Language files\German.nlf" LoadLanguageFile "$${NSISDIR}\Contrib\Language files\Italian.nlf" LoadLanguageFile "$${NSISDIR}\Contrib\Language files\Spanish.nlf" + LoadLanguageFile "$${NSISDIR}\Contrib\Language files\PortugueseBR.nlf" Unicode true @@ -101,6 +102,11 @@ NSIS_SCRIPT_TEMPLATE = r""" VIAddVersionKey /LANG=$${LANG_SPANISH} "LegalCopyright" "Syncplay" VIAddVersionKey /LANG=$${LANG_SPANISH} "FileDescription" "Syncplay" + VIAddVersionKey /LANG=$${LANG_PORTUGUESEBR} "ProductName" "Syncplay" + VIAddVersionKey /LANG=$${LANG_PORTUGUESEBR} "FileVersion" "$version.0" + VIAddVersionKey /LANG=$${LANG_PORTUGUESEBR} "LegalCopyright" "Syncplay" + VIAddVersionKey /LANG=$${LANG_PORTUGUESEBR} "FileDescription" "Syncplay" + LangString ^SyncplayLanguage $${LANG_ENGLISH} "en" LangString ^Associate $${LANG_ENGLISH} "Associate Syncplay with multimedia files." LangString ^Shortcut $${LANG_ENGLISH} "Create Shortcuts in following locations:" @@ -154,6 +160,15 @@ NSIS_SCRIPT_TEMPLATE = r""" LangString ^AutomaticUpdates $${LANG_SPANISH} "Buscar actualizaciones automáticamente" LangString ^UninstConfig $${LANG_SPANISH} "Borrar archivo de configuración." + LangString ^SyncplayLanguage $${LANG_PORTUGUESEBR} "pt_BR" + LangString ^Associate $${LANG_PORTUGUESEBR} "Associar Syncplay aos arquivos multimídia." + LangString ^Shortcut $${LANG_PORTUGUESEBR} "Criar atalhos nos seguintes locais:" + LangString ^StartMenu $${LANG_PORTUGUESEBR} "Menu Iniciar" + LangString ^Desktop $${LANG_PORTUGUESEBR} "Área de trabalho" + LangString ^QuickLaunchBar $${LANG_PORTUGUESEBR} "Barra de acesso rápido" + LangString ^AutomaticUpdates $${LANG_PORTUGUESEBR} "Verificar atualizações automaticamente" + LangString ^UninstConfig $${LANG_PORTUGUESEBR} "Deletar arquivo de configuração." + ; Remove text to save space LangString ^ClickInstall $${LANG_GERMAN} " " @@ -259,6 +274,8 @@ NSIS_SCRIPT_TEMPLATE = r""" Push Italiano Push $${LANG_SPANISH} Push Español + Push $${LANG_PORTUGUESEBR} + Push 'Português do Brasil' Push A ; A means auto count languages LangDLL::LangDialog "Language Selection" "Please select the language of Syncplay and the installer" Pop $$LANGUAGE diff --git a/syncplay/messages.py b/syncplay/messages.py index 83d8105..f9fefac 100755 --- a/syncplay/messages.py +++ b/syncplay/messages.py @@ -6,6 +6,7 @@ from . import messages_ru from . import messages_de from . import messages_it from . import messages_es +from . import messages_pt_BR messages = { "en": messages_en.en, @@ -13,6 +14,7 @@ messages = { "de": messages_de.de, "it": messages_it.it, "es": messages_es.es, + "es": messages_pt_BR.pt_BR, "CURRENT": None } diff --git a/syncplay/messages_de.py b/syncplay/messages_de.py index d952b97..63330bf 100755 --- a/syncplay/messages_de.py +++ b/syncplay/messages_de.py @@ -139,12 +139,12 @@ de = { "not-supported-by-server-error": "Diese Funktion wird vom Server nicht unterstützt. Es wird ein Server mit Syncplay Version {}+ benötigt, aktuell verwendet wird jedoch Version {}.", # minVersion, serverVersion "shared-playlists-not-supported-by-server-error": "Die Geteilte-Playlists-Funktion wird von diesem Server eventuell nicht unterstützt. Um ein korrektes Funktionieren sicherzustellen wird ein Server mit Syncplay Version {}+ benötigt, aktuell verwendet wird jedoch Version {}.", # minVersion, serverVersion - "shared-playlists-disabled-by-server-error": "Die Geteilte-Playlists-Funktion wurde in der Serverkonfiguration deaktiviert. Um diese Funktion zu verwenden, musst du dich mit einem anderen Server verbinden.", + "shared-playlists-disabled-by-server-error": "Die Geteilte-Playlists-Funktion wurde in der Serverkonfiguration deaktiviert. Um diese Funktion zu verwenden, musst du dich mit einem anderen Server verbinden.", "invalid-seek-value": "Ungültige Zeitangabe", "invalid-offset-value": "Ungültiger Offset-Wert", - "switch-file-not-found-error": "Konnte nicht zur Datei „{0}“ wechseln. Syncplay sucht im Verzeichnis der aktuellen Datei und angegebenen Medienverzeichnissen.", # File not found, folder it was not found in + "switch-file-not-found-error": "Konnte nicht zur Datei „{0}“ wechseln. Syncplay sucht im Verzeichnis der aktuellen Datei und angegebenen Medienverzeichnissen.", # File not found, folder it was not found in "folder-search-timeout-error": "Die Suche nach Medien in den Medienverzeichnissen wurde abgebrochen, weil es zu lange gedauert hat, „{}“ zu durchsuchen. Das kann passieren, wenn du in deiner Liste der Medienverzeichnisse ein Verzeichnis mit zu vielen Unterverzeichnissen auswhälst. Damit der automatische Dateiwechsel wieder funktioniert, wähle Datei->Medienverzeichnisse auswählen in der Menüleiste und entferne dieses Verzeichnis oder ersetze es mit einem geeigneten Unterverzeichnis. Wenn das Verzeichnis in Ordnung ist, kannst du es reaktivieren, indem du Datei->Medienverzeichnisse auswählen wählst und „OK“ drückst.", # Folder "folder-search-first-file-timeout-error": "Die Suche nach Medien in den Medienverzeichnissen wurde abgebrochen, weil es zu lange gedauert hat, auf „{}“ zuzugreifen. Das kann passieren, wenn es sich dabei um ein Netzwerkgerät handelt und du eingestellt hast, dass es sich nach Inaktivität ausschaltet. Damit der automatische Dateiwechsel wieder funktioniert, wähle Datei->Medienverzeichnisse auswählen in der Menüleiste und entferne dieses Verzeichnis oder löse das Problem (z.B. indem du die Energiespareinstellungen anpasst).", # Folder "added-file-not-in-media-directory-error": "Du hast eine Datei in im Verzeichnis „{}“ geladeden, welches kein bekanntes Medienverzeichnis ist. Du kannst es als Medienverzeichnis hinzufügen, indem du Datei->Medienverzeichnisse auswählen in der Menüleiste wählst.", # Folder @@ -168,7 +168,7 @@ de = { "file-argument": 'Abzuspielende Datei', "args-argument": 'Player-Einstellungen; Wenn du Einstellungen, die mit - beginnen, nutzen willst, stelle ein einzelnes \'--\'-Argument davor', "clear-gui-data-argument": 'Setzt die Pfad- und GUI-Fenster-Daten die in den QSettings gespeichert sind zurück', - "language-argument": 'Sprache für Syncplay-Nachrichten (de/en/ru/it/es)', + "language-argument": 'Sprache für Syncplay-Nachrichten (de/en/ru/it/es/pt_BR)', "version-argument": 'gibt die aktuelle Version aus', "version-message": "Du verwendest Syncplay v. {} ({})", diff --git a/syncplay/messages_en.py b/syncplay/messages_en.py index 1b2d96e..0ad1f34 100755 --- a/syncplay/messages_en.py +++ b/syncplay/messages_en.py @@ -168,7 +168,7 @@ en = { "file-argument": 'file to play', "args-argument": 'player options, if you need to pass options starting with - prepend them with single \'--\' argument', "clear-gui-data-argument": 'resets path and window state GUI data stored as QSettings', - "language-argument": 'language for Syncplay messages (de/en/ru/it/es)', + "language-argument": 'language for Syncplay messages (de/en/ru/it/es/pt_BR)', "version-argument": 'prints your version', "version-message": "You're using Syncplay version {} ({})", diff --git a/syncplay/messages_es.py b/syncplay/messages_es.py index e216d35..7763bbc 100644 --- a/syncplay/messages_es.py +++ b/syncplay/messages_es.py @@ -168,7 +168,7 @@ es = { "file-argument": 'archivo a reproducir', "args-argument": 'opciones del reproductor, si necesitas pasar opciones que empiezan con -, pásalas utilizando \'--\'', "clear-gui-data-argument": 'restablece ruta y los datos del estado de la ventana GUI almacenados como QSettings', - "language-argument": 'lenguaje para los mensajes de Syncplay (de/en/ru/it/es)', + "language-argument": 'lenguaje para los mensajes de Syncplay (de/en/ru/it/es/pt_BR)', "version-argument": 'imprime tu versión', "version-message": "Estás usando la versión de Syncplay {} ({})", diff --git a/syncplay/messages_it.py b/syncplay/messages_it.py index ee18fbd..7b41927 100755 --- a/syncplay/messages_it.py +++ b/syncplay/messages_it.py @@ -168,7 +168,7 @@ it = { "file-argument": 'file da riprodurre', "args-argument": 'opzioni del player, se hai bisogno di utilizzare opzioni che iniziano con - anteponi un singolo \'--\'', "clear-gui-data-argument": 'ripristina il percorso e i dati impostati tramite interfaccia grafica e salvati come QSettings', - "language-argument": 'lingua per i messaggi di Syncplay (de/en/ru/it/es)', + "language-argument": 'lingua per i messaggi di Syncplay (de/en/ru/it/es/pt_BR)', "version-argument": 'mostra la tua versione', "version-message": "Stai usando la versione di Syncplay {} ({})", diff --git a/syncplay/messages_pt_BR.py b/syncplay/messages_pt_BR.py new file mode 100644 index 0000000..15e2dff --- /dev/null +++ b/syncplay/messages_pt_BR.py @@ -0,0 +1,506 @@ +# coding:utf8 + +"""Brazilian Portuguese dictionary""" + +pt_BR = { + "LANGUAGE": "Português do Brasil", + + # Client notifications + "config-cleared-notification": "Configurações removidas. Mudanças serão salvas quando você armazenar uma configuração válida.", + + "relative-config-notification": "Arquivo(s) de configuração relativa carregado(s): {}", + + "connection-attempt-notification": "Tentando se conectar a {}:{}", # Port, IP + "reconnection-attempt-notification": "Conexão com o servidor perdida, tentando reconectar", + "disconnection-notification": "Desconectado do servidor", + "connection-failed-notification": "Conexão com o servidor falhou", + "connected-successful-notification": "Conectado com sucesso ao servidor", + "retrying-notification": "%s, tentando novamente em %d segundos...", # Seconds + "reachout-successful-notification": "Alcançado {} ({}) com sucesso", + + "rewind-notification": "Retrocedendo devido à diferença de tempo com {}", # User + "fastforward-notification": "Avançando devido à diferença de tempo com {}", # User + "slowdown-notification": "Diminuindo a velocidade devido à diferença de tempo com {}", # User + "revert-notification": "Revertendo velocidade ao normal", + + "pause-notification": "{} pausou", # User + "unpause-notification": "{} despausou", # User + "seek-notification": "{} saltou de {} para {}", # User, from time, to time + + "current-offset-notification": "Deslocamento atual: {} segundos", # Offset + + "media-directory-list-updated-notification": "Os diretórios de mídia do Syncplay foram atualizados.", + + "room-join-notification": "{} entrou na sala: '{}'", # User + "left-notification": "{} saiu da sala", # User + "left-paused-notification": "{} saiu da sala, {} pausou", # User who left, User who paused + "playing-notification": "{} está tocando '{}' ({})", # User, file, duration + "playing-notification/room-addendum": " na sala: '{}'", # Room + + "not-all-ready": "Não está pronto: {}", # Usernames + "all-users-ready": "Todo mundo está pronto ({} users)", # Number of ready users + "ready-to-unpause-notification": "Agora você está definido como pronto - despause novamente para despausar", + "set-as-ready-notification": "Agora você está definido como pronto", + "set-as-not-ready-notification": "Agora você está definido como não pronto", + "autoplaying-notification": "Reprodução automática em {}...", # Number of seconds until playback will start + + "identifying-as-controller-notification": "Identificando-se como operador da sala com a senha '{}'...", + "failed-to-identify-as-controller-notification": "{} falhou ao se identificar como operador da sala.", + "authenticated-as-controller-notification": "{} autenticou-se como um operador da sala", + "created-controlled-room-notification": "Criou a sala gerenciada '{}' com a senha '{}'. Por favor, salve essa informação para futura referência!", # RoomName, operatorPassword + + "file-different-notification": "O arquivo que você está tocando parece ser diferente do arquivo de {}", # User + "file-differences-notification": "Seus arquivos se diferem da(s) seguinte(s) forma(s): {}", # Differences + "room-file-differences": "Diferenças de arquivos: {}", # File differences (filename, size, and/or duration) + "file-difference-filename": "nome", + "file-difference-filesize": "tamanho", + "file-difference-duration": "duração", + "alone-in-the-room": "Você está sozinho na sala", + + "different-filesize-notification": " (o tamanho do arquivo deles é diferente do seu!)", + "userlist-playing-notification": "{} está tocando:", # Username + "file-played-by-notification": "Arquivo: {} está sendo tocado por:", # File + "no-file-played-notification": "{} não está tocando um arquivo", # Username + "notplaying-notification": "Pessoas que não estão tocando nenhum arquivo:", + "userlist-room-notification": "Na sala '{}':", # Room + "userlist-file-notification": "Arquivo", + "controller-userlist-userflag": "Operador", + "ready-userlist-userflag": "Pronto", + + "update-check-failed-notification": "Não foi possível verificar automaticamente se o Syncplay {} é a versão mais recente. Deseja visitar https://syncplay.pl/ para checar manualmente por atualizações?", # Syncplay version + "syncplay-uptodate-notification": "O Syncplay está atualizado", + "syncplay-updateavailable-notification": "Uma nova versão do Syncplay está disponível. Deseja visitar a página de lançamentos?", + + "mplayer-file-required-notification": "Syncplay com mplayer requer que você forneça o arquivo ao começar", + "mplayer-file-required-notification/example": "Exemplo de uso: syncplay [opções] [url|caminho_ate_o_arquivo/]nome_do_arquivo", + "mplayer2-required": "O Syncplay é incompatível com o MPlayer 1.x, por favor use mplayer2 ou mpv", + + "unrecognized-command-notification": "Comando não reconhecido", + "commandlist-notification": "Comandos disponíveis:", + "commandlist-notification/room": "\tr [nome] - muda de sala", + "commandlist-notification/list": "\tl - mostra lista de usuários", + "commandlist-notification/undo": "\tu - desfaz último salto", + "commandlist-notification/pause": "\tp - alterna pausa", + "commandlist-notification/seek": "\t[s][+-]time - salta para o valor de tempo dado, se + ou - não forem especificados, será o tempo absoluto em segundos ou minutos:segundos", + "commandlist-notification/help": "\th - esta mensagem de ajuda", + "commandlist-notification/toggle": "\tt - alterna o seu status de prontidão para assistir", + "commandlist-notification/create": "\tc [nome] - cria sala gerenciado usando o nome da sala atual", + "commandlist-notification/auth": "\ta [senha] - autentica-se como operador da sala com a senha", + "commandlist-notification/chat": "\tch [mensagem] - envia uma mensagem no chat da sala", + "syncplay-version-notification": "Versão do Syncplay: {}", # syncplay.version + "more-info-notification": "Mais informações disponíveis em: {}", # projectURL + + "gui-data-cleared-notification": "O Syncplay limpou o caminho e o estado de dados da janela usados pela GUI.", + "language-changed-msgbox-label": "O idioma será alterado quando você salvar as mudanças e abrir o Syncplay novamente.", + "promptforupdate-label": "O Syncplay pode verificar automaticamente por atualizações de tempos em tempos?", + + "media-player-latency-warning": "Aviso: O reprodutor de mídia demorou {} para responder. Se você tiver problemas de sincronização, feche outros programas para liberar recursos do sistema e, se isso não funcionar, tente outro reprodutor de mídia.", # Seconds to respond + "mpv-unresponsive-error": "O mpv não respondeu por {} segundos, portanto parece que não está funcionando. Por favor, reinicie o Syncplay.", # Seconds to respond + + # Client prompts + "enter-to-exit-prompt": "Aperte Enter para sair\n", + + # Client errors + "missing-arguments-error": "Alguns argumentos necessários estão faltando, por favor reveja --help", + "server-timeout-error": "A conexão com o servidor ultrapassou o tempo limite", + "mpc-slave-error": "Não foi possível abrir o MPC no slave mode!", + "mpc-version-insufficient-error": "A versão do MPC é muito antiga, por favor use `mpc-hc` >= `{}`", + "mpc-be-version-insufficient-error": "A versão do MPC-BE é muito antiga, por favor use `mpc-be` >= `{}`", + "mpv-version-error": "O Syncplay não é compatível com esta versão do mpv. Por favor, use uma versão diferente do mpv (por exemplo, Git HEAD).", + "player-file-open-error": "O reprodutor falhou ao abrir o arquivo", + "player-path-error": "O caminho até o arquivo executável do reprodutor não está configurado corretamente. Os reprodutores suportados são: mpv, mpv.net, VLC, MPC-HC, MPC-BE e mplayer2", + "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-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", + + "unable-to-start-client-error": "Não foi possível iniciar o client", + + "player-path-config-error": "O caminho até o arquivo executável do reprodutor não está configurado corretamente. Os reprodutores suportados são: mpv, mpv.net, VLC, MPC-HC, MPC-BE e mplayer2.", + "no-file-path-config-error": "O arquivo deve ser selecionado antes de iniciar seu reprodutor", + "no-hostname-config-error": "O endereço do servidor não pode ser vazio", + "invalid-port-config-error": "A porta deve ser válida", + "empty-value-config-error": "{} não pode ser vazio", # Config option + + "not-json-error": "Não é uma string codificada como json\n", + "hello-arguments-error": "Not enough Hello arguments\n", # DO NOT TRANSLATE + "version-mismatch-error": "Discrepância entre versões do client e do servidor\n", + "vlc-failed-connection": "Falha ao conectar ao VLC. Se você não instalou o syncplay.lua e está usando a versão mais recente do VLC, por favor veja https://syncplay.pl/LUA/ para mais instruções.", + "vlc-failed-noscript": "O VLC reportou que a interface de script do syncplay.lua não foi instalada. Por favor, veja https://syncplay.pl/LUA/ para mais instruções.", + "vlc-failed-versioncheck": "Esta versão do VLC não é suportada pelo Syncplay.", + + "feature-sharedPlaylists": "playlists compartilhadas", # used for not-supported-by-server-error + "feature-chat": "chat", # used for not-supported-by-server-error + "feature-readiness": "prontidão", # used for not-supported-by-server-error + "feature-managedRooms": "salas gerenciadas", # used for not-supported-by-server-error + + "not-supported-by-server-error": "O recurso {} não é suportado por este servidor.", # feature + "shared-playlists-not-supported-by-server-error": "O recurso de playlists compartilhadas pode não ser suportado por este servidor. Para garantir que funcione corretamente, é necessário um servidor rodando Syncplay {} ou superior, mas este está rodando Syncplay {}.", # minVersion, serverVersion + "shared-playlists-disabled-by-server-error": "O recurso de playlists compartilhadas foi desativado nas configurações do servidor. Para usar este recurso, você precisa se conectar a um servidor diferente.", + + "invalid-seek-value": "Valor de salto inválido", + "invalid-offset-value": "Valor de deslocamento inválido", + + "switch-file-not-found-error": "Não foi possível mudar para o arquivo '{0}'. O Syncplay procura nos diretórios de mídia especificados.", # File not found + "folder-search-timeout-error": "A busca por mídias no diretório de mídias foi cancelada pois demorou muito tempo para procurar em '{}'. Isso ocorre quando você seleciona uma pasta com muitas subpastas em sua lista de pastas de mídias a serem pesquisadas. Para que a troca automática de arquivos funcione novamente, selecione 'Arquivo -> Definir diretórios de mídias' na barra de menus e remova esse diretório ou substitua-o por uma subpasta apropriada. Se a pasta não tiver problemas, é possível reativá-la selecionando 'Arquivo -> Definir diretórios de mídias' e pressionando 'OK'.", # Folder + "folder-search-first-file-timeout-error": "A busca por mídias em '{}' foi interrompida, pois demorou muito para acessar o diretório. Isso pode acontecer se for uma unidade de rede ou se você configurar sua unidade para hibernar depois de um período de inatividade. Para que a troca automática de arquivos funcione novamente, vá para 'Arquivo -> Definir diretórios de mídias' e remova o diretório ou resolva o problema (por exemplo, alterando as configurações de economia de energia da unidade).", # Folder + "added-file-not-in-media-directory-error": "Você carregou um arquivo em '{}', que não é um diretório de mídias conhecido. Você pode adicioná-lo isso como um diretório de mídia selecionando 'Arquivo -> Definir diretórios de mídias' na barra de menus.", # Folder + "no-media-directories-error": "Nenhum diretório de mídias foi definido. Para que os recursos de playlists compartilhadas e troca automática de arquivos funcionem corretamente, selecione 'Arquivo -> Definir diretórios de mídias' e especifique onde o Syncplay deve procurar para encontrar arquivos de mídia.", + "cannot-find-directory-error": "Não foi possível encontrar o diretório de mídia '{}'. Para atualizar sua lista de diretórios de mídias, selecione 'Arquivo -> Definir diretórios de mídias' na barra de menus e especifique onde o Syncplay deve procurar para encontrar arquivos de mídia.", + + "failed-to-load-server-list-error": "Não foi possível carregar a lista de servidores públicos. Por favor, visite https://www.syncplay.pl/ em seu navegador.", + + # Client arguments + "argument-description": 'Solução para sincronizar reprodução de múltiplas instâncias de reprodutores de mídia pela rede.', + "argument-epilog": 'Se nenhuma opção for fornecida, os valores de _config serão usados', + "nogui-argument": 'não mostrar GUI', + "host-argument": 'endereço do servidor', + "name-argument": 'nome de usuário desejado', + "debug-argument": 'modo depuração', + "force-gui-prompt-argument": 'fazer o prompt de configuração aparecer', + "no-store-argument": 'não guardar valores em .syncplay', + "room-argument": 'sala padrão', + "password-argument": 'senha do servidor', + "player-path-argument": 'caminho até o executável do reprodutor de mídia', + "file-argument": 'arquivo a ser tocado', + "args-argument": 'opções do reprodutor; se você precisar passar opções começando com -, as preceda com um único argumento \'--\'', + "clear-gui-data-argument": 'redefine o caminho e o estado de dados da janela da GUI para as de QSettings', + "language-argument": 'idioma para mensagens do Syncplay (de/en/ru/it/es/pt_BR)', + + "version-argument": 'exibe sua versão', + "version-message": "Você está usando o Syncplay versão {} ({})", + + "load-playlist-from-file-argument": "carrega playlist de um arquivo de texto (uma entrada por linha)", + + # Client labels + "config-window-title": "Configuração do Syncplay", + + "connection-group-title": "Configurações de conexão", + "host-label": "Endereço do servidor: ", + "name-label": "Nome de usuário (opcional): ", + "password-label": "Senha do servidor (se existir): ", + "room-label": "Sala padrão: ", + + "media-setting-title": "Configurações do reprodutor de mídia", + "executable-path-label": "Executável do reprodutor:", + "media-path-label": "Arquivo de vídeo ou URL (opcional):", + "player-arguments-label": "Argumentos para o reprodutor (opcional):", + "browse-label": "Navegar", + "update-server-list-label": "Atualizar lista", + + "more-title": "Mostrar mais configurações", + "never-rewind-value": "Nunca", + "seconds-suffix": " s", + "privacy-sendraw-option": "Enviar bruto", + "privacy-sendhashed-option": "Enviar hasheado", + "privacy-dontsend-option": "Não enviar", + "filename-privacy-label": "Informação do nome do arquivo:", + "filesize-privacy-label": "Informação do tamanho do arquivo:", + "checkforupdatesautomatically-label": "Verificar atualizações do Syncplay automaticamente", + "slowondesync-label": "Diminuir velocidade em dessincronizações menores (não suportado pelo MPC-HC/BE)", + "rewindondesync-label": "Retroceder em dessincronização maiores (recomendado)", + "fastforwardondesync-label": "Avançar se estiver ficando para trás (recomendado)", + "dontslowdownwithme-label": "Nunca desacelerar ou retroceder outros (experimental)", + "pausing-title": "Pausando", + "pauseonleave-label": "Pausar quando um usuário sair (por exemplo, se for desconectado)", + "readiness-title": "Estado de prontidão inicial", + "readyatstart-label": "Marque-me como 'pronto para assistir' por padrão", + "forceguiprompt-label": "Não mostrar sempre a janela de configuração do Syncplay", # (Inverted) + "showosd-label": "Ativar mensagens na tela (OSD)", + + "showosdwarnings-label": "Incluir avisos (por exemplo, quando arquivos são diferentes, usuários não estão prontos, etc)", + "showsameroomosd-label": "Incluir eventos da sua sala", + "shownoncontrollerosd-label": "Incluir eventos de não operadores em salas gerenciadas", + "showdifferentroomosd-label": "Incluir eventos de outras salas", + "showslowdownosd-label": "Incluir notificações de desaceleramento ou retrocedimento", + "language-label": "Idioma:", + "automatic-language": "Padrão ({})", # Default language + "showdurationnotification-label": "Avisar sobre discrepância nas durações dos arquivos de mídia", + "basics-label": "Básicos", + "readiness-label": "Play/Pause", + "misc-label": "Miscelânea", + "core-behaviour-title": "Comportamento da sala padrão", + "syncplay-internals-title": "Syncplay internals", + "syncplay-mediasearchdirectories-title": "Diretórios a buscar por mídias", + "syncplay-mediasearchdirectories-label": "Diretórios a buscar por mídias (um caminho por linha)", + "sync-label": "Sincronizar", + "sync-otherslagging-title": "Se outros estiverem ficando pra trás...", + "sync-youlaggging-title": "Se você estiver ficando pra trás...", + "messages-label": "Mensagens", + "messages-osd-title": "Configurações das mensagens na tela (OSD)", + "messages-other-title": "Outras configurações de tela", + "chat-label": "Chat", + "privacy-label": "Privacidade", # Currently unused, but will be brought back if more space is needed in Misc tab + "privacy-title": "Configurações de privacidade", + "unpause-title": "Se você apertar play, definir-se como pronto e:", + "unpause-ifalreadyready-option": "Despausar se você já estiver definido como pronto", + "unpause-ifothersready-option": "Despausar se você já estiver pronto ou outros na sala estiverem prontos (padrão)", + "unpause-ifminusersready-option": "Despausar se você já estiver pronto ou outros na sala estiverem prontos e o número mínimo de usuários está pronto", + "unpause-always": "Sempre despausar", + "syncplay-trusteddomains-title": "Domínios confiáveis (para serviços de streaming e conteúdo hospedado)", + + "chat-title": "Entrada de mensagem do chat", + "chatinputenabled-label": "Habilitar entrada de chat via mpv", + "chatdirectinput-label": "Permitir entrada instantânea de chat (evita ter de apertar Enter para abrir o chat)", + "chatinputfont-label": "Fonte da entrada de chat", + "chatfont-label": "Definir fonte", + "chatcolour-label": "Definir cor", + "chatinputposition-label": "Posição da área de entrada de mensagens no mpv", + "chat-top-option": "Topo", + "chat-middle-option": "Meio", + "chat-bottom-option": "Fundo", + "chatoutputheader-label": "Saída de mensagem do chat", + "chatoutputfont-label": "Fonte da saída de chat", + "chatoutputenabled-label": "Habilitar saída de chat no reprodutor de mídia (apenas mpv por enquanto)", + "chatoutputposition-label": "Modo de saída", + "chat-chatroom-option": "Estilo sala de bate-papo", + "chat-scrolling-option": "Estilo de rolagem", + + "mpv-key-tab-hint": "[TAB] para alternar acesso instantâneo ao chat.", + "mpv-key-hint": "[ENTER] para enviar mensagem. [ESC] para sair do modo de chat.", + "alphakey-mode-warning-first-line": "Você pode usar os antigos atalhos do mpv com as teclas a-z.", + "alphakey-mode-warning-second-line": "Aperte [TAB] para retornar ao modo de chat instantâneo do Syncplay.", + + "help-label": "Ajuda", + "reset-label": "Restaurar padrões", + "run-label": "Começar Syncplay", + "storeandrun-label": "Salvar mudanças e começar Syncplay", + + "contact-label": "Sinta-se livre para mandar um e-mail para dev@syncplay.pl, conversar via chat pelo canal do IRC #Syncplay no irc.freenode.net, abrir uma issue pelo GitHub, curtir nossa página no Facebook, nos seguir no Twitter ou visitar https://syncplay.pl/. Não use o Syncplay para mandar informações sensíveis/confidenciais.", + + "joinroom-label": "Juntar-se a uma sala", + "joinroom-menu-label": "Juntar-se à sala {}", + "seektime-menu-label": "Saltar para o tempo", + "undoseek-menu-label": "Desfazer salto", + "play-menu-label": "Play", + "pause-menu-label": "Pause", + "playbackbuttons-menu-label": "Mostrar botões de reprodução", + "autoplay-menu-label": "Mostrar botão de reprodução automática", + "autoplay-guipushbuttonlabel": "Tocar quando todos estiverem prontos", + "autoplay-minimum-label": "Mín. de usuários:", + + "sendmessage-label": "Enviar", + + "ready-guipushbuttonlabel": "Estou pronto para assistir!", + + "roomuser-heading-label": "Sala / Usuário", + "size-heading-label": "Tamanho", + "duration-heading-label": "Duração", + "filename-heading-label": "Nome do arquivo", + "notifications-heading-label": "Notificações", + "userlist-heading-label": "Lista de quem está tocando o quê", + + "browseformedia-label": "Navegar por arquivos de mídia", + + "file-menu-label": "&Arquivo", # & precedes shortcut key + "openmedia-menu-label": "A&brir arquivo de mídia", + "openstreamurl-menu-label": "Abrir &URL de stream de mídia", + "setmediadirectories-menu-label": "Definir &diretórios de mídias", + "loadplaylistfromfile-menu-label": "&Carregar playlist de arquivo", + "saveplaylisttofile-menu-label": "&Salvar playlist em arquivo", + "exit-menu-label": "&Sair", + "advanced-menu-label": "A&vançado", + "window-menu-label": "&Janela", + "setoffset-menu-label": "Definir &deslocamento", + "createcontrolledroom-menu-label": "&Criar sala gerenciada", + "identifyascontroller-menu-label": "&Identificar-se como operador da sala", + "settrusteddomains-menu-label": "D&efinir domínios confiáveis", + "addtrusteddomain-menu-label": "Adicionar {} como domínio confiável", # Domain + + "edit-menu-label": "&Editar", + "cut-menu-label": "Cor&tar", + "copy-menu-label": "&Copiar", + "paste-menu-label": "C&olar", + "selectall-menu-label": "&Selecionar todos", + + "playback-menu-label": "&Reprodução", + + "help-menu-label": "&Ajuda", + "userguide-menu-label": "Abrir &guia de usuário", + "update-menu-label": "&Verificar atualizações", + + "startTLS-initiated": "Tentando estabelecer conexão segura", + "startTLS-secure-connection-ok": "Conexão segura estabelecida ({})", + "startTLS-server-certificate-invalid": 'Não foi possível estabelecer uma conexão segura. O servidor usa um certificado de segurança inválido. Essa comunicação pode ser interceptada por terceiros. Para mais detalhes de solução de problemas, consulte aqui.', + "startTLS-not-supported-client": "Este client não possui suporte para TLS", + "startTLS-not-supported-server": "Este servidor não possui suporte para TLS", + + # TLS certificate dialog + "tls-information-title": "Detalhes do certificado", + "tls-dialog-status-label": "Syncplay está usando uma conexão criptografada para {}.", + "tls-dialog-desc-label": "A criptografia com um certificado digital mantém as informações em sigilo quando são enviadas para ou do
servidor {}.", + "tls-dialog-connection-label": "Informações criptografadas usando o Transport Layer Security (TLS), versão {} com o conjunto de cifras (cipher suite)
: {}.", + "tls-dialog-certificate-label": "Certificado emitido em {} e válido até {}.", + + # About dialog + "about-menu-label": "&Sobre o Syncplay", + "about-dialog-title": "Sobre o Syncplay", + "about-dialog-release": "Versão {}, lançamento {}", + "about-dialog-license-text": "Licenciado sob a Licença Apache, Versão 2.0", + "about-dialog-license-button": "Licença", + "about-dialog-dependencies": "Dependências", + + "setoffset-msgbox-label": "Definir deslocamento", + "offsetinfo-msgbox-label": "Deslocamento (veja https://syncplay.pl/guide/ para instruções de uso):", + + "promptforstreamurl-msgbox-label": "Abrir transmissão de mídia via URL", + "promptforstreamurlinfo-msgbox-label": "Transmitir URL", + + "addfolder-label": "Adicionar pasta", + + "adduris-msgbox-label": "Adicionar URLs à playlist (uma por linha)", + "editplaylist-msgbox-label": "Definir playlist (uma por linha)", + "trusteddomains-msgbox-label": "Domínios para os quais é permitido trocar automaticamente (um por linha)", + + "createcontrolledroom-msgbox-label": "Criar sala gerenciada", + "controlledroominfo-msgbox-label": "Informe o nome da sala gerenciada\r\n(veja https://syncplay.pl/guide/ para instruções de uso):", + + "identifyascontroller-msgbox-label": "Identificar-se como operador da sala", + "identifyinfo-msgbox-label": "Informe a senha de operador para esta sala\r\n(veja https://syncplay.pl/guide/ para instruções de uso):", + + "public-server-msgbox-label": "Selecione o servidor público para esta sessão de visualização", + + "megabyte-suffix": " MB", + + # Tooltips + + "host-tooltip": "Hostname ou IP para se conectar, opcionalmente incluindo uma porta (por exemplo, syncplay.pl:8999). Só sincroniza-se com pessoas no mesmo servidor/porta.", + "name-tooltip": "Nome pelo qual você será conhecido. Não há cadastro, então você pode facilmente mudar mais tarde. Se não for especificado, será gerado aleatoriamente.", + "password-tooltip": "Senhas são necessárias apenas para servidores privados.", + "room-tooltip": "O nome da sala para se conectar pode ser praticamente qualquer coisa, mas você só irá se sincronizar com pessoas na mesma sala.", + + "executable-path-tooltip": "Localização do seu reprodutor de mídia preferido (mpv, VLC, MPC-HC/BE ou mplayer2).", + "media-path-tooltip": "Localização do vídeo ou transmissão a ser aberto. Necessário com o mplayer2.", + "player-arguments-tooltip": "Argumentos de comando de linha adicionais para serem repassados ao reprodutor de mídia.", + "mediasearcdirectories-arguments-tooltip": "Diretório onde o Syncplay vai procurar por arquivos de mídia, por exemplo quando você estiver usando o recurso de clicar para mudar. O Syncplay irá procurar recursivamente pelas subpastas.", + + "more-tooltip": "Exibe configurações menos frequentemente utilizadas.", + "filename-privacy-tooltip": "Modo de privacidade para mandar nome de arquivo do arquivo atual para o servidor.", + "filesize-privacy-tooltip": "Modo de privacidade para mandar tamanho do arquivo atual para o servidor.", + "privacy-sendraw-tooltip": "Enviar esta informação sem ofuscação. Esta é a opção padrão com mais funcionalidades.", + "privacy-sendhashed-tooltip": "Mandar versão hasheada da informação, tornando-a menos visível aos outros clients.", + "privacy-dontsend-tooltip": "Não enviar esta informação ao servidor. Esta opção oferece a maior privacidade.", + "checkforupdatesautomatically-tooltip": "Checar o site do Syncplay regularmente para ver se alguma nova versão do Syncplay está disponível.", + "slowondesync-tooltip": "Reduzir a velocidade de reprodução temporariamente quando necessário para trazer você de volta à sincronia com os outros espectadores. Não suportado pelo MPC-HC/BE.", + "dontslowdownwithme-tooltip": "Significa que outros não serão desacelerados ou retrocedidos se sua reprodução estiver ficando para trás. Útil para operadores de salas.", + "pauseonleave-tooltip": "Pausar reprodução se você for disconectado ou se alguém sair da sua sala.", + "readyatstart-tooltip": "Definir-se como 'pronto' ao começar (do contrário você será definido como 'não pronto' até mudar seu estado de prontidão)", + "forceguiprompt-tooltip": "Diálogo de configuração não é exibido ao abrir um arquivo com o Syncplay.", # (Inverted) + "nostore-tooltip": "Começar Syncplay com a dada configuração, mas não guardar as mudanças permanentemente.", # (Inverted) + "rewindondesync-tooltip": "Retroceder automaticamente quando necessário para sincronizar. Desabilitar isto pode resultar em grandes dessincronizações!", + "fastforwardondesync-tooltip": "Avançar automaticamente quando estiver fora de sincronia com o operador da sala (ou sua posição pretendida caso 'Nunca desacelerar ou retroceder outros' estiver habilitada).", + "showosd-tooltip": "Envia mensagens do Syncplay à tela do reprodutor de mídia (OSD).", + "showosdwarnings-tooltip": "Mostra avisos se: estiver tocando arquivos diferentes, sozinho na sala, usuários não prontos, etc.", + "showsameroomosd-tooltip": "Mostra notificações na tela (OSD) sobre eventos relacionados à sala em que o usuário está.", + "shownoncontrollerosd-tooltip": "Mostra notificações na tela (OSD) sobre eventos relacionados a não operadores que estão em salas gerenciadas.", + "showdifferentroomosd-tooltip": "Mostra notificações na tela (OSD) sobre eventos relacionados à sala em que o usuário não está.", + "showslowdownosd-tooltip": "Mostra notificações na tela (OSD) sobre desaceleramento/retrocedimento por conta de diferença nos tempos.", + "showdurationnotification-tooltip": "Útil quando um segmento em um arquivo de múltiplas partes está faltando, mas pode resultar em falsos positivos.", + "language-tooltip": "Idioma a ser utilizado pelo Syncplay.", + "unpause-always-tooltip": "Se você pressionar para despausar, sempre te definirá como pronto e despausará em vez de simplesmente te definir com pronto.", + "unpause-ifalreadyready-tooltip": "Se você pressionar para despausar quando não estiver pronto, irá te definir como pronto - despause novamente para despausar.", + "unpause-ifothersready-tooltip": "Se você apertar para despausar quando não estiver pronto, só irá despausar quando outros estiverem prontos.", + "unpause-ifminusersready-tooltip": "Se você apertar para despausar quando não estiver pronto, só irá despausar quando outros estiverem prontos e o número mínimo de usuários for atingido.", + "trusteddomains-arguments-tooltip": "Domínios para os quais é permitido trocar automaticamente quando as playlists compartilhadas estiverem habilitadas.", + + "chatinputenabled-tooltip": "Ativar entrada de chat via mpv (pressione Enter para escrever, Enter para enviar, ESC para cancelar)", + "chatdirectinput-tooltip": "Evita ter de apertar 'Enter' para entrar no modo de entrada de chat no mpv. Pressione TAB no mpv para temporariamente desabilitar esta função.", + "font-label-tooltip": "Fonte usada ao escrever mensagens no chat no mpv. Apenas no lado do client, portanto não afeta a cor que os outros veem.", + "set-input-font-tooltip": "Família de fonte usada ao escrever mensagens no chat no mpv. Apenas no lado do client, portanto não afeta a cor que os outros veem.", + "set-input-colour-tooltip": "Cor de fonte usada ao escrever mensagens no chat no mpv. Apenas no lado do client, portanto não afeta a cor que os outros veem.", + "chatinputposition-tooltip": "Lugar no mpv onde a entrada de chat será exibida quando você apertar Enter e digitar.", + "chatinputposition-top-tooltip": "Colocar entrada de chat no topo da janela do mpv.", + "chatinputposition-middle-tooltip": "Colocar entrada de chat no meio da janela do mpv.", + "chatinputposition-bottom-tooltip": "Colocar entrada de chat no fundo da janela do mpv.", + "chatoutputenabled-tooltip": "Mostrar mensagens de chat na tela do reprodutor (OSD) (se suportado pelo reprodutor).", + "font-output-label-tooltip": "Fonte da saída de chat.", + "set-output-font-tooltip": "Fonte usada para exibir mensagens do chat.", + "chatoutputmode-tooltip": "Como as mensagens do chat são exibidas.", + "chatoutputmode-chatroom-tooltip": "Exibe novas linhas de chat diretamente abaixo da linha anterior.", + "chatoutputmode-scrolling-tooltip": "Exibe novas linhas de chat rolando-as da direita pra esquerda.", + + "help-tooltip": "Abre o guia de usuário do Syncplay.pl.", + "reset-tooltip": "Redefine todas as configurações para seus respectivos padrões.", + "update-server-list-tooltip": "Conecta ao syncplay.pl para atualizar a lista de servidores públicos.", + + "sslconnection-tooltip": "Conectado com segurança ao servidor. Clique para exibir detalhes do certificado.", + + "joinroom-tooltip": "Sair da sala atual e ingressar na sala especificada.", + "seektime-msgbox-label": "Saltar para tempo especificado (em segundos ou minutos:segundos). Use + ou - para fazer um pulo relativo ao tempo atual.", + "ready-tooltip": "Indica se você está pronto para assistir.", + "autoplay-tooltip": "Reproduzir automaticamente quando todos os usuários que tiverem indicadores de prontidão estiverem prontos e o limiar de usuários for atingido.", + "switch-to-file-tooltip": "Clique duas vezes para mudar para {}", # Filename + "sendmessage-tooltip": "Mandar mensagem para a sala", + + # In-userlist notes (GUI) + "differentsize-note": "Tamanhos diferentes!", + "differentsizeandduration-note": "Tamanhos e durações diferentes!", + "differentduration-note": "Durações diferentes!", + "nofile-note": "(Nenhum arquivo está sendo tocado)", + + # Server messages to client + "new-syncplay-available-motd-message": "Você está usando o Syncplay {}, mas uma versão mais nova está disponível em https://syncplay.pl", # ClientVersion + + # Server notifications + "welcome-server-notification": "Seja bem-vindo ao servidor de Syncplay, versão {0}", # version + "client-connected-room-server-notification": "{0}({2}) conectou-se à sala '{1}'", # username, host, room + "client-left-server-notification": "{0} saiu do servidor", # name + "no-salt-notification": "POR FAVOR, NOTE: Para permitir que as senhas de operadores de sala geradas por esta instância do servidor ainda funcionem quando o servidor for reiniciado, por favor, adicione o seguinte argumento de linha de comando ao executar o servidor de Syncplay no futuro: --salt {}", # Salt + + + # Server arguments + "server-argument-description": 'Solução para sincronizar a reprodução de múltiplas instâncias de MPlayer e MPC-HC/BE pela rede. Instância de servidor', + "server-argument-epilog": 'Se nenhuma opção for fornecida, os valores de _config serão utilizados', + "server-port-argument": 'porta TCP do servidor', + "server-password-argument": 'senha do servidor', + "server-isolate-room-argument": 'salas devem ser isoladas?', + "server-salt-argument": "string aleatória utilizada para gerar senhas de salas gerenciadas", + "server-disable-ready-argument": "desativar recurso de prontidão", + "server-motd-argument": "caminho para o arquivo o qual o motd será obtido", + "server-chat-argument": "O chat deve ser desativado?", + "server-chat-maxchars-argument": "Número máximo de caracteres numa mensagem do chat (o padrão é {})", # Default number of characters + "server-maxusernamelength-argument": "Número máximos de caracteres num nome de usuário (o padrão é {})", + "server-stats-db-file-argument": "Habilita estatísticas de servidor usando o arquivo db SQLite fornecido", + "server-startTLS-argument": "Habilita conexões TLS usando os arquivos de certificado no caminho fornecido", + "server-messed-up-motd-unescaped-placeholders": "A Mensagem do Dia possui placeholders não escapados. Todos os sinais de $ devem ser dobrados (como em $$).", + "server-messed-up-motd-too-long": "A Mensagem do Dia é muito longa - máximo de {} caracteres, {} foram dados.", + + # Server errors + "unknown-command-server-error": "Comando desconhecido: {}", # message + "not-json-server-error": "Não é uma string codificada como json: {}", # message + "line-decode-server-error": "Não é uma string UTF-8", + "not-known-server-error": "Você deve ser conhecido pelo servidor antes de mandar este comando", + "client-drop-server-error": "Drop do client: {} -- {}", # host, error + "password-required-server-error": "Senha necessária", + "wrong-password-server-error": "Senha incorreta fornecida", + "hello-server-error": "Not enough Hello arguments", # DO NOT TRANSLATE + + # Playlists + "playlist-selection-changed-notification": "{} mudou a seleção da playlist", # Username + "playlist-contents-changed-notification": "{} atualizou playlist", # Username + "cannot-find-file-for-playlist-switch-error": "Não foi possível encontrar o arquivo {} no diretórios de mídia para a troca de playlist!", # Filename + "cannot-add-duplicate-error": "Não foi possível adicionar uma segunda entrada para '{}' para a playlist uma vez que duplicatas não são permitidas.", # Filename + "cannot-add-unsafe-path-error": "Não foi possível automaticamente carregar {} porque este não é um domínio confiado. Você pode trocar para a URL manualmente dando um clique duplo nela na playlist e adicionando o domínio aos domínios confiáveis em 'Arquivo -> Avançado -> Definir domínios confiáveis'. Se você clicar com o botão direito na URL, você pode adicionar esta URL como domínio confiável pelo menu de contexto.", # Filename + "sharedplaylistenabled-label": "Habilitar playlists compartilhadas", + "removefromplaylist-menu-label": "Remover da playlist", + "shuffleremainingplaylist-menu-label": "Embaralhar resto da playlist", + "shuffleentireplaylist-menu-label": "Embaralhar toda a playlist", + "undoplaylist-menu-label": "Desfazer última alteração à playlist", + "addfilestoplaylist-menu-label": "Adicionar arquivo(s) ao final da playlist", + "addurlstoplaylist-menu-label": "Adicionar URL(s) ao final da playlist", + "editplaylist-menu-label": "Editar playlist", + + "open-containing-folder": "Abrir pasta contendo este arquivo", + "addyourfiletoplaylist-menu-label": "Adicionar seu arquivo à playlist", + "addotherusersfiletoplaylist-menu-label": "Adicionar arquivos de {} à playlist", # [Username] + "addyourstreamstoplaylist-menu-label": "Adicionar sua transmissão à playlist", + "addotherusersstreamstoplaylist-menu-label": "Adicionar transmissão de {} à playlist", # [Username] + "openusersstream-menu-label": "Abrir transmissão de {}", # [username]'s + "openusersfile-menu-label": "Abrir arquivo de {}", # [username]'s + + "playlist-instruction-item-message": "Arraste um arquivo aqui para adicioná-lo à playlist compartilhada.", + "sharedplaylistenabled-tooltip": "Operadores da sala podem adicionar arquivos para a playlist compartilhada para tornar mais fácil para todo mundo assistir a mesma coisa. Configure os diretórios de mídia em 'Miscelânea'.", +} diff --git a/syncplay/messages_ru.py b/syncplay/messages_ru.py index 5c0dc19..7d9b3a2 100755 --- a/syncplay/messages_ru.py +++ b/syncplay/messages_ru.py @@ -169,7 +169,7 @@ ru = { "file-argument": 'воспроизводимый файл', "args-argument": 'параметры проигрывателя; если нужно передать параметры, начинающиеся с - , то сначала пишите \'--\'', "clear-gui-data-argument": 'сбрасывает путь и данные о состоянии окна GUI, хранимые как QSettings', - "language-argument": 'язык сообщений Syncplay (de/en/ru/it/es)', + "language-argument": 'язык сообщений Syncplay (de/en/ru/it/es/pt_BR)', "version-argument": 'выводит номер версии', "version-message": "Вы используете Syncplay версии {} ({})", From 25314cb5528c6999d1b0145c1a3dfed7000d53d5 Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Wed, 22 Apr 2020 19:56:07 +0200 Subject: [PATCH 105/105] macOS app: get system language from QLocale Fixes: #288 --- syncplay/messages.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/syncplay/messages.py b/syncplay/messages.py index f9fefac..a5e9b24 100755 --- a/syncplay/messages.py +++ b/syncplay/messages.py @@ -46,9 +46,15 @@ def getMissingStrings(): def getInitialLanguage(): - import locale try: - initialLanguage = locale.getdefaultlocale()[0].split("_")[0] + import sys + frozen = getattr(sys, 'frozen', '') + if frozen in 'macosx_app': + from PySide2.QtCore import QLocale + initialLanguage = QLocale.system().uiLanguages()[0].split('-')[0] + else: + import locale + initialLanguage = locale.getdefaultlocale()[0].split("_")[0] if initialLanguage not in messages: initialLanguage = constants.FALLBACK_INITIAL_LANGUAGE except: