From 8307236b11df663d1f98b717e6ea3a680c6e0f2f Mon Sep 17 00:00:00 2001 From: Et0h Date: Sun, 17 Jul 2016 12:33:55 +0100 Subject: [PATCH] Fix VLC load file code so it actually plays, and be more stringent on old VLC versions as they randomly crash --- resources/lua/intf/syncplay.lua | 9 +++++---- syncplay/__init__.py | 2 +- syncplay/constants.py | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/resources/lua/intf/syncplay.lua b/resources/lua/intf/syncplay.lua index 6725cb1..ebef3d5 100644 --- a/resources/lua/intf/syncplay.lua +++ b/resources/lua/intf/syncplay.lua @@ -5,7 +5,7 @@ Principal author: Etoh Other contributors: DerGenaue, jb Project: http://syncplay.pl/ - Version: 0.2.9 + Version: 0.3.0 Note: * This interface module is intended to be used in conjunction with Syncplay. @@ -84,7 +84,7 @@ You may also need to re-copy the syncplay.lua file when you update VLC. --]==========================================================================] -local connectorversion = "0.2.9" +local connectorversion = "0.3.0" local vlcversion = vlc.misc.version() local durationdelay = 500000 -- Pause for get_duration command etc for increased reliability (uses microseconds) local loopsleepduration = 2500 -- Pause for every event loop (uses microseconds) @@ -466,6 +466,7 @@ function load_file (filepath) vlc.playlist.clear() vlc.playlist.enqueue({{path=uri}}) vlc.playlist.next() + vlc.playlist.play() return "load-file-attempted\n" end @@ -532,8 +533,8 @@ function set_playstate(argument) return errormsg end -if string.sub(vlcversion,1,2) == "1." then - vlc.msg.err("This version of VLC is not known to support the Syncplay interface module. Please use VLC 2+.") +if string.sub(vlcversion,1,2) == "1." or string.sub(vlcversion,1,3) == "2.0" or string.sub(vlcversion,1,3) == "2.1" or string.sub(vlcversion,1,5) == "2.2.0" then + vlc.msg.err("This version of VLC does not support Syncplay. Please use VLC 2.2.1+.") quit_vlc() else l = vlc.net.listen_tcp(host, port) diff --git a/syncplay/__init__.py b/syncplay/__init__.py index 6f250f6..feb3a05 100644 --- a/syncplay/__init__.py +++ b/syncplay/__init__.py @@ -1,4 +1,4 @@ version = '1.4.0' milestone = 'Yoitsu' -release_number = '29' +release_number = '30' projectURL = 'http://syncplay.pl/' diff --git a/syncplay/constants.py b/syncplay/constants.py index 135ebe4..97af0ce 100644 --- a/syncplay/constants.py +++ b/syncplay/constants.py @@ -72,7 +72,7 @@ COMMANDS_AUTH = ['a','auth'] COMMANDS_TOGGLE = ['t','toggle'] MPC_MIN_VER = "1.6.4" VLC_MIN_VERSION = "2.2.1" -VLC_INTERFACE_MIN_VERSION = "0.2.9" +VLC_INTERFACE_MIN_VERSION = "0.3.0" VLC_LATENCY_ERROR_THRESHOLD = 2.0 MPV_UNRESPONSIVE_THRESHOLD = 60.0 CONTROLLED_ROOMS_MIN_VERSION = "1.3.0"