From 09c8b596ee3a9fdc86f9c3f972dbddc62357e77a Mon Sep 17 00:00:00 2001 From: et0h Date: Sat, 19 Sep 2020 15:29:21 +0100 Subject: [PATCH] Add error that VLC 4 does not support Syncplay --- syncplay/constants.py | 2 +- syncplay/messages_de.py | 2 +- syncplay/messages_en.py | 2 +- syncplay/messages_es.py | 2 +- syncplay/messages_it.py | 2 +- syncplay/messages_pt_BR.py | 2 +- syncplay/messages_pt_PT.py | 2 +- syncplay/messages_ru.py | 2 +- syncplay/resources/lua/intf/syncplay.lua | 7 ++++++- 9 files changed, 14 insertions(+), 9 deletions(-) diff --git a/syncplay/constants.py b/syncplay/constants.py index f3b9a0d..5a7a888 100755 --- a/syncplay/constants.py +++ b/syncplay/constants.py @@ -131,7 +131,7 @@ COMMANDS_DELETE = ['delete', 'd', 'qd'] MPC_MIN_VER = "1.6.4" MPC_BE_MIN_VER = "1.5.2.3123" VLC_MIN_VERSION = "2.2.1" -VLC_INTERFACE_VERSION = "0.3.5" +VLC_INTERFACE_VERSION = "0.3.6" VLC_LATENCY_ERROR_THRESHOLD = 2.0 MPV_UNRESPONSIVE_THRESHOLD = 60.0 CONTROLLED_ROOMS_MIN_VERSION = "1.3.0" diff --git a/syncplay/messages_de.py b/syncplay/messages_de.py index 57b50c2..e07427f 100755 --- a/syncplay/messages_de.py +++ b/syncplay/messages_de.py @@ -133,7 +133,7 @@ de = { "not-json-error": "Kein JSON-String\n", "hello-arguments-error": "Zu wenige Hello-Argumente\n", "version-mismatch-error": "Verschiedene Versionen auf Client und Server\n", - "vlc-failed-connection": "Kann nicht zu VLC verbinden. Wenn du syncplay.lua nicht installiert hast, findest du auf https://syncplay.pl/LUA/ [Englisch] eine Anleitung.", + "vlc-failed-connection": "Kann nicht zu VLC verbinden. Wenn du syncplay.lua nicht installiert hast, findest du auf https://syncplay.pl/LUA/ [Englisch] eine Anleitung. VLC 4 does not support Syncplay.", # TO DO: TRANSLATE "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", "vlc-initial-warning": 'VLC does not always provide accurate position information to Syncplay, especially for .mp4 and .avi files. If you experience problems with erroneous seeking then please try an alternative media player such as mpv.', # TODO: Translate diff --git a/syncplay/messages_en.py b/syncplay/messages_en.py index 9db8c9c..824b23c 100755 --- a/syncplay/messages_en.py +++ b/syncplay/messages_en.py @@ -133,7 +133,7 @@ en = { "not-json-error": "Not a json encoded string\n", "hello-arguments-error": "Not enough Hello arguments\n", # DO NOT TRANSLATE "version-mismatch-error": "Mismatch between versions of client and server\n", - "vlc-failed-connection": "Failed to connect to VLC. If you have not installed syncplay.lua and are using the latest verion of VLC then please refer to https://syncplay.pl/LUA/ for instructions.", + "vlc-failed-connection": "Failed to connect to VLC. If you have not installed syncplay.lua and are using the latest verion of VLC then please refer to https://syncplay.pl/LUA/ for instructions. VLC 4 does not support Syncplay.", "vlc-failed-noscript": "VLC has reported that the syncplay.lua interface script has not been installed. Please refer to https://syncplay.pl/LUA/ for instructions.", "vlc-failed-versioncheck": "This version of VLC is not supported by Syncplay.", "vlc-initial-warning": 'VLC does not always provide accurate position information to Syncplay, especially for .mp4 and .avi files. If you experience problems with erroneous seeking then please try an alternative media player such as mpv.', diff --git a/syncplay/messages_es.py b/syncplay/messages_es.py index 9c4e63c..33f8405 100644 --- a/syncplay/messages_es.py +++ b/syncplay/messages_es.py @@ -133,7 +133,7 @@ es = { "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-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 4 does not support Syncplay.", # TO DO: TRANSLATE "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.", "vlc-initial-warning": 'VLC does not always provide accurate position information to Syncplay, especially for .mp4 and .avi files. If you experience problems with erroneous seeking then please try an alternative media player such as mpv.', # TODO: Translatef diff --git a/syncplay/messages_it.py b/syncplay/messages_it.py index b6fafc7..97f8e1f 100755 --- a/syncplay/messages_it.py +++ b/syncplay/messages_it.py @@ -133,7 +133,7 @@ it = { "not-json-error": "Non è una stringa con codifica JSON\n", "hello-arguments-error": "Not enough Hello arguments\n", # DO NOT TRANSLATE "version-mismatch-error": "La versione del client è diversa da quella del server\n", - "vlc-failed-connection": "Impossibile collegarsi a VLC. Se non hai installato syncplay.lua e stai usando l'ultima versione di VLC, fai riferimento a https://syncplay.pl/LUA/ per istruzioni.", + "vlc-failed-connection": "Impossibile collegarsi a VLC. Se non hai installato syncplay.lua e stai usando l'ultima versione di VLC, fai riferimento a https://syncplay.pl/LUA/ per istruzioni. VLC 4 does not support Syncplay.", # TO DO: TRANSLATE "vlc-failed-noscript": "VLC ha segnalato che lo script di interfaccia syncplay.lua non è stato installato. Per favore, fai riferimento a https://syncplay.pl/LUA/ per istruzioni.", "vlc-failed-versioncheck": "Questa versione di VLC non è supportata da Syncplay.", "vlc-initial-warning": 'VLC does not always provide accurate position information to Syncplay, especially for .mp4 and .avi files. If you experience problems with erroneous seeking then please try an alternative media player such as mpv.', # TODO: Translate diff --git a/syncplay/messages_pt_BR.py b/syncplay/messages_pt_BR.py index 2f140f8..ab42e2e 100644 --- a/syncplay/messages_pt_BR.py +++ b/syncplay/messages_pt_BR.py @@ -133,7 +133,7 @@ pt_BR = { "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-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 4 does not support Syncplay.", # TO DO: TRANSLATE "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.", "vlc-initial-warning": 'VLC does not always provide accurate position information to Syncplay, especially for .mp4 and .avi files. If you experience problems with erroneous seeking then please try an alternative media player such as mpv.', # TODO: Translate diff --git a/syncplay/messages_pt_PT.py b/syncplay/messages_pt_PT.py index 9e1cc52..6f63dc7 100644 --- a/syncplay/messages_pt_PT.py +++ b/syncplay/messages_pt_PT.py @@ -133,7 +133,7 @@ pt_PT = { "not-json-error": "Não é uma string codificada como JSON\n", "hello-arguments-error": "Falta de argumentos Hello\n", # DO NOT TRANSLATE "version-mismatch-error": "Discrepância entre versões do cliente 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-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 4 does not support Syncplay.", # TO DO: TRANSLATE "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.", "vlc-initial-warning": 'VLC does not always provide accurate position information to Syncplay, especially for .mp4 and .avi files. If you experience problems with erroneous seeking then please try an alternative media player such as mpv.', # TODO: Translate diff --git a/syncplay/messages_ru.py b/syncplay/messages_ru.py index 18529f9..7fb6b2c 100755 --- a/syncplay/messages_ru.py +++ b/syncplay/messages_ru.py @@ -133,7 +133,7 @@ ru = { "not-json-error": "Не является закодированной json-строкой\n", "hello-arguments-error": "Не хватает аргументов Hello\n", "version-mismatch-error": "Конфликт версий между клиентом и сервером\n", - "vlc-failed-connection": "Ошибка подключения к VLC. Если у Вас не установлен syncplay.lua, то обратитесь к https://syncplay.pl/LUA/ за инструкциями.", + "vlc-failed-connection": "Ошибка подключения к VLC. Если у Вас не установлен syncplay.lua, то обратитесь к https://syncplay.pl/LUA/ за инструкциями. VLC 4 does not support Syncplay.", # TO DO: TRANSLATE "vlc-failed-noscript": "VLC сообщает, что скрипт интерфейса syncplay.lua не установлен. Пожалуйста, обратитесь к https://syncplay.pl/LUA/ за инструкциями.", "vlc-failed-versioncheck": "Данная версия VLC не поддерживается Syncplay. Пожалуйста, используйте VLC версии 2 или выше.", "vlc-initial-warning": 'VLC does not always provide accurate position information to Syncplay, especially for .mp4 and .avi files. If you experience problems with erroneous seeking then please try an alternative media player such as mpv.', # TODO: Translate diff --git a/syncplay/resources/lua/intf/syncplay.lua b/syncplay/resources/lua/intf/syncplay.lua index 54ce65f..c50c562 100644 --- a/syncplay/resources/lua/intf/syncplay.lua +++ b/syncplay/resources/lua/intf/syncplay.lua @@ -78,9 +78,14 @@ Syncplay should install this automatically to your user folder. --]==========================================================================] -local connectorversion = "0.3.5" +local connectorversion = "0.3.6" local vlcversion = vlc.misc.version() local vlcmajorversion = tonumber(vlcversion:sub(1,1)) -- get the major version of VLC + +if vlcmajorversion > 3 then + vlc.misc.quit() +end + local durationdelay = 500000 -- Pause for get_duration command etc for increased reliability (uses microseconds) local loopsleepduration = 2500 -- Pause for every event loop (uses microseconds) local quitcheckfrequency = 20 -- Check whether VLC has closed every X loops